Board index » delphi » how to drop client connections on server socket?

how to drop client connections on server socket?


2004-04-14 04:03:10 AM
delphi166
Hi, Besides the SendStreamThenDrop method, is there another way to drop
individual clients on a server socket?
Thanks
Suo
 
 

Re:how to drop client connections on server socket?

"Suodatin Pussi" <XXXX@XXXXX.COM>wrote in
message news:407c4730$XXXX@XXXXX.COM...
Quote
Hi, Besides the SendStreamThenDrop method, is there
another way to drop individual clients on a server socket?
Use the server's ActiveConnections[] property. Find the client that you are
interested in and simply Close() it.
Gambit
 

Re:how to drop client connections on server socket?

"Suodatin Pussi" <XXXX@XXXXX.COM>wrote in
message news:407c5f76$XXXX@XXXXX.COM...
Quote
Will try that again. For some reason it just kept closing
all the connections (the socket) not just drop a single
connection.
You probably weren't closing the proper socket to begin with. You are not
supposed to close the server's socket, just the client socket that the
server stores in the Connections[] property. For example:
ServerSocket1->Socket->Connections[index]->Close();
Gambit
 

Re:how to drop client connections on server socket?

Will try that again. For some reason it just kept closing all the
connections (the socket) not just drop a single connection.
Quote
Use the server's ActiveConnections[] property. Find the client that you are
interested in and simply Close() it.


Gambit


 

Re:how to drop client connections on server socket?

Ok thanks, it works now
Quote
ServerSocket1->Socket->Connections[index]->Close();


Gambit