Is it possible to have a client & server working under a main, but seperate threads
Posted on 2005-03-30
I have a standard Client and server that I want to get working under the same process, problably using threads.
-Is this possible or is it redundant?
To reformulate my question: I need to start both client & server to await files and send files(not yet implemented) to/from another peer client/Server.
public void Server() throws IOException
ServerSocket ss = new ServerSocket(5556);
System.out.println("Connection is ok");
public void Client(String url) throws IOException
Socket s = new Socket(url,5556);
System.out.println("Socket = " + s);
catch ..... etc
Many thanks for any help.