TwclServerClientDataConnection.Accept(TwclServerConnection,Pointer,Cardinal) Method

The method accepts the client connection request.

Namespace: wclConnections
protected
 function Accept(const Server: TwclServerConnection; const Params: Pointer;
 const ParamsSize: Cardinal): Integer; override;

Parameters

Server
Type: TwclServerConnection

A TwclServerConnection object owns the client connection.

Params
Type: Pointer

An optional pointer to the hardware-dependent data contains information about client connection request.

ParamsSize
Type: Cardinal

An optional parameters size.

Return Value

Type: Integer

If the function succeed the return value is wclErrors.WCL_E_SUCCESS. Otherwise the method returns one of the WCL error codes.

Overrides

TwclServerClientConnection.Accept(TwclServerConnection,Pointer,Cardinal)

The method called by the server when connection from a remote client device has already been accepted.

The method is always called from the main (or from the same) thread that runs the server.

The method prepares the class for comunication with a remote client.

If the method fails it disconnects already accepted client connection.

The Server parametr must be a TwclServerDataConnection object.