LInet::OnDataReceiving

#include "ltwrappr.h"

L_INT LInet::OnDataReceiving(plConnection, nError, pBuffer, ulSize)

LInet L_FAR * plConnection;

/* instance of a remote computer */

L_INT nError;

/* error code */

L_CHAR L_FAR pBuffer;

/* buffer containing data */

L_UINT32 ulSize;

/* size of the buffer */

Overridable function that notifies a computer that data is being received from a remote connection.

Parameter

Description

plConnection

Pointer to the instance of the remote computer that is sending the 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.

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.

The buffer pointed to by pBuffer will be freed upon returning from this 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

// a user defined class derived from LInet should be used to support the 
// OnDataReceiving callback functions
// suppose it was named as LUserInet

LUserInet UserInet;
LInet L_FAR *plRemote;


// connect to LEAD
UserInet.Connect("207.238.49.190", 1000);


L_INT LUserInet::OnDataReceiving(LInet L_FAR plConnection, L_INT nError, L_CHAR L_FAR 
pBuffer, L_UINT32 ulSize)
{
   // other operations
     return SUCCESS;
}