OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Closing the Connection

The code to close a connection is identical for both client and server, whether the socket is a stream socket or datagram socket.

If you have a pointer to the socket object:

TSocket* socket;

You can close the socket connection with

socket->CloseSocket().

Note that the destructor for the TSocket class will also close the socket.