LInet::OnUser1Received

#include "ltwrappr.h"

virtual L_INT LInet::OnUser1Received(plConnection, nError, pBuffer, ulSize)

LInet * plConnection;

/* instance of a remote computer */

L_INT nError;

/* error code */

L_CHAR * pBuffer;

/* buffer containing data */

L_SIZE_T ulSize;

/* size of the buffer */

Overridable function that notifies a computer that user defined data has been received.

Parameter

Description

plConnection

Pointer to the instance of the remote computer that sent the user-defined data.

nError

If no error has occurred, nError will be SUCCESS. If nError is < SUCCESS, an error has occurred.

pBuffer

Pointer to the buffer that contains the data of a user-defined format.

ulSize

Size of pBuffer.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

If nError is < SUCCESS, pBuffer should be ignored.

Immediately after successfully connecting to a LEADTOOLS server started with LInet::ServerInit, if auto process is enabled, this callback function will be the first one called and pBuffer will contain a NULL terminated string containing "LEAD Technologies Server X.X" where X.X is the server version number.

The buffer pointed to by pBuffer will be freed upon returning from the function.

Do not delete plConnection.

Required DLLs and Libraries

LTNET

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Class Members

Topics:

Sending and Receiving Data

Example

For an example, refer to NETCAP demo.