WeOnlyDo! wodWebServer ActiveX - UserConnected Method
      
 

Description

Called when user connects to wodWebServer.


Return Type

None  


Syntax

object.UserConnected Owner, User, Action



The UserConnected Method syntax has these parts:

Part Description
object An expression evaluating to an object of type IwodWebNotify.
Owner Required. A wodWebServerCom object. Reference to wodWebServer instance that called this notification method.
User Required. A WebUser object. Reference to User who connected to the server.
Action Required. A WebActions enumeration, as described in settings. You should set this value to Allow if you want to accept this user, or Deny if you want to close the connection.

Settings

The settings for Action are:

Constant Value Description
 Deny 0 Deny execution of the action.
 Allow 1 Allow to execute action.

Remarks

NOTE: This method is called only if you implemented IwodWebNotify interface in your application, and wodWebServer.Notification property has received reference to instance of your implementation.

UserConnected notification method is called immediately when connection is established between the client and the wodWebServer, but before he sent any requests to the server. At this point you can decide to reject user's connection. You can do so if, for example, his RemoteIP does not match list of addresses you plan to allow, or you are not ready to serve clients, etc..