<- Go Home
MTSocket
This is a somewhat complex and awkward library of classes providing the simple creation and usage of multithreaded sockets. The client socket class (ADT) is used on the client side of a connection to handle reception of data (override the OnReceive function) and the template server class uses your derived client socket class to accept incoming connections and then will also use OnReceive to manage communication. Direct communication from the server is possible using a Broadcast function that as an optional parameter can send a message to all connected clients except one (this is useful for echoing a message from one client to all other clients). It is definitely not the most elegant design, but this is my 3rd or 4th attempt (in about 7 years) at a multithreaded socket class and it is the best I've come up with.
Download it here: MTSocket.zip 10.7kB
Here's a multi-client chat sample client and server: MTChat.zip 3.14kB
Email me: lucky760@yahoo.com
Last modified: 06/08/05