Marc Collin said:
ok for the second method but we need to connect to the client
the client need to be a server..
When you establish a TCP connection from a client to the server, that
connection is two-way. The server can use it to send data to the
client. That's why java.net.Socket has methods called getInputStream()
and getOutputStream().
If your client disconnect, though, then yes they will need a
ServerSocket to listen for reconnection attempts from the server (and
this is also problematic because many -- or most? -- clients won't have
publicly available ports.)
--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation