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

Using

The TSocketManager class is a small class that can be used to do two things:

  1. Start up and shut down the Winsock session
  2. Store arrays of Sockets

You don't absolutely need the TSocketManager to do either of the above things, and you may never even be interested in having any class store an array of TSockets, but the TSocketManager is there to do either if you wish.

The Winsock startup function WSAStartup(), returns a WSAData structure. TSocketManager uses a subclass of the WSAData class called the TSocketInfo class. Since TSocketInfo is a subclass of WSAData, it can be used anywhere that Winsock or Windows Socket Class requires a WSAData.

TSocketManager calls WSAStartup() in its constructor, and saves the result for later use. For Winsock version information, call the TSocketManager function "Information()." TSocketManager automatically calls WSACleanup in its destructor.