procedure TForm1.ServerSocket1ClientRead(Sender: TObject;
Socket: TCustomWinSocket);
var
i:integer;
begin
for i:=0 to serversocket1.Socket.ActiveConnections-1 do
begin
if socket.Handle=serversocket1.Socket.connections.Handle then
begin
serversocket1.Socket.connections.SendBuf(...);//发消息
serversocket1.Socket.connections.Close;//关闭
end;
end;
end;