My questions are, how do I connect to the other application, if I have an IP? I've been reading a bit about Sockets, which seems to be the way to do it, but I'm not sure. And how would I listen for some data sent from the other side, or even listen for specific data?
I want it to start out by the ClientApp connecting to the ServerApp, and then sending its IP address to the ServerApp so the ServerApp knows where to send stuff to. But I'm thinking that that might not be necessary if the ClientApp makes the connection.
In case I need to send the IP, I want the ServerApp to listen for that IP address coming in through the connection, and then send an object to the ClientApp.
So I also need the ClientApp to listen for that object coming in. The ClientApp will then receive the object, and perform a method on it that I have defined. When it is done with this method, the object should contain some data, so therefore I now want to send that object back to the ServerApp.
Therefore I want the ServerApp to also listen for that object coming in. And when that is done, I want the ServerApp to just run and wait until it gets another request from the ClientApp.
Also, I want the ServerApp to be able to send out objects to several ClientApps, therefore I'm programming the ServerApp using Threads.
Listening to the apps for specific data is my biggest problem right now, and the only thing I really don't know how to do.
Edit:
Also, how do I check whether or not a thread is still running?
Hmm, noone who knows how to make a connection between two Java applications? :(
Edited by WingedPanther, 02 January 2009 - 03:27 PM.
Double post


Sign In
Create Account


Back to top









