it's ok for the server part ? is it the same method for the client part (to send data to server) ?
----- Original Message ----- From: "Francois PIETTE" <[EMAIL PROTECTED]> To: "ICS support mailing" <twsocket@elists.org> Sent: Monday, November 20, 2006 6:56 PM Subject: Re: [twsocket] How server can send data to clients ? >> I have a TWSocketServer which is listening incoming clients connections. >> Once a client is connected, the server send data to it. >> Sometimes, I need this client to send command to the server. >> Is it possible with ics components ? >> If yes, how can I do it ? > > When the client is connected to the server, you have a bi-directionnal > communication channel. The server can send data to client and client can > send data to the server. > > If the client isn't connected, the server has no way to send anything to > the > client. By definition a client is the one which initiate a connection and > a > server is the one which passively wait for incomming connections. > > Of course nothing prevent your client to be also a server ! > > Speaking about TWSocketServer, you have an indexed property Client[] which > allows the developper to access to any connected client. You -have > ClientCount property telling the size of the client array. You can do > something like that (Not tested, just tuyped here in the message): > > for i := 0 to WSocketServer1.ClientCount - 1 do > WSocketServer1.Client[I].SendStr('Hello World'#13#10); > > > -- > Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html > -- > [EMAIL PROTECTED] > http://www.overbyte.be > > > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://www.elists.org/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be > -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be