Well here is my problem. My chat program everytime a new connection request comes in, loads a new socket and then accepts the connection. The problem that im having is that it loads more than one socket but only connects one. So when someone leaves or disconnects the socketcount is wrong. Here is my code for winsock1_connectionrequest
sockets = sockets + 1
Load Winsock1(sockets)
Winsock1(sockets).Accept requestID
Combo1.AddItem Winsock1(sockets).RemoteHostIP & " Connected"
|