|
Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
LInet::CloseAll
#include "ltwrappr.h"
virtual L_INT LInet::CloseAll(uType=SERVER|CLIENT; bGraceful=FALSE)
|
L_UINT uType; |
/* disconnect type */ |
|
L_BOOL bGraceful; |
/* connection closure type */ |
Closes all connections with a remote computer, either servers or clients.
|
Parameter |
Description |
|
|
uType |
Flag that determines the type of connection to close. Possible values are: |
|
|
|
Value |
Meaning |
|
|
SERVER |
Close all servers connections. |
|
|
CLIENT |
Close all client connections. |
|
bGraceful |
|
Flag that determines when the connection is closed. Possible values are: |
|
|
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
The user can combine the two values to close all connections.
You must initialize the LEADTOOLS Peer-to-Peer 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
L_INT LInet__CloseAllExample()
{
L_INT nRet;
LInet Inet;
// connect to LEAD.
nRet = Inet.Connect("207.238.49.190", 1000);
if(nRet != SUCCESS)
return nRet;
// other operations
nRet = Inet.CloseAll();
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}