Send an object over a socket between clients
835473May 30 2011 — edited May 31 2011Dear team,
Let's suppose I have 3 PCs. One creates a (server)socket and the other 2 are connected to it, using its Local IP and they can have a chat.
Example:
192.168.4.1 (it is the "server", it creates the socket and waits for connections. Then, it "broadcasts" the message to all the connected clients.)
192.168.4.2 (a "client", connected to the above by specifying the IP and the port.)
192.168.4.3 (a "client", connected to 192.168.4.1 by specifying the previous IP and the port.)
How I can send an object between the two "clients"? I tried the Serializable interface. It works locally (on the same PC) but when I run it using another IDE or another client it does not work...
Any idea about how can I send an object please?
Thank you in advance!