Back to product page

WebSocketConnect callback method

Called when request for WebSocket connection arrives.


  • Basic
object.WebSocketConnect (Owner, User, Action)
The WebSocketConnect(object,User,Action) syntax has these parts:
objectAn expression evaluating to an object of type IwodWebNotify
UserWebUser object. Reference to the user who sent the request.
ActionWebActions enumeration. You should set this value to Allow user to create websocket.


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

After you have accepted websocket connection, client may start to send you data. As data arrives, this notification method is called. Data may be fragmented, and this notification method is called for each fragment. PartSize argument will always have size of current fragment. If there are more parts or chunks expected to arrive, FrameSize will be 0.

When full data arrives that form a Frame, FrameSize argument will contain size of full fragment.

You should use WebSocketReceiveText method to read incoming data anytime you wish, inside or outside of this notification method.