On Dec 23, 2007, at 07:31, Francois PIETTE wrote:
> Fixed IP has no relation with the number of sockets. It's just a
> matter of
> DNS.
I think I understand what he means: He currently has a single
server/client and both of them are "hard-coded" to connect to each
other via their IP addresses. He needs to build his system so that all
the (multiple) clients on the network can connect to the server and
that the server does not respond to original test client IP it has
hard-coded only.
Is this correct, Markus?
If so, its very simple and you probably do not need to do anything
extra: All clients need to know the IP address of the server (or to
where ever they are connecting), and once they connect to it, the
server socket will be bound and all responses will go to it. In
TWSocket, the difference between the client and server socket is that
the client initiates the connection and the server "listens" on the
port waiting for it. But once the connection is established, they both
communicate in exactly the same way and there is virtually (or perhaps
even technically) no distinction.
If you need to handle multiple clients at a time, you should consider
using TWSocketServer, which does this beautifully and very simply
(check out TcpSrv demo in the ICS distribution). After a client is
connected, the listening socket spawns a new listener-client object to
handle it, and from there on, they can communicate.
If this does not address your issue, then could you please rephrase
your problem with more precise details, as we are not understanding it
properly.
Thanks,
dZ.
--
DZ-Jay [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be