LInet::Close

#include "ltwrappr.h"

virtual L_INT LInet::Close(plRemoteComp, bGraceful=FALSE)

LInet *plRemoteComp;

/* remote computer class instance */

L_BOOL bGraceful;

/* disconnect flag */

Closes a connection with a remote computer.

Parameter

Description

plRemoteComp

An instance of the remote computer for which connection is to be closed.

bGraceful

Flag that determines when the connection is closed. Possible values are:

 

Value

Meaning

 

TRUE

allow all data to be sent before connection is closed.

 

FALSE

close the connection now.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

If bGraceful is TRUE, then the connection will be closed after all the data has been sent. If you have sent a large chunk of data immediately before calling LInet::Close, then there is a high probability that not every byte has been sent. Closing with bGraceful = FALSE means that the connection is closed without delay, and with the possibility that the data you sent will be truncated. Closing with bGraceful = TRUE means that the close will be delayed until all the data has been sent. You will be notified of the disconnection in the LInet::OnClose function.

You must initialize the LEADTOOLS Internet DLL using LInet::StartUp before calling this function.

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:

LInet::Connect, LInet::ServerInit, LInet::ServerShutdown, LInet::SendData, LInet::StartUp, LInet::ShutDown, Class Members

Example

For an example, refer to LInet::Connect.