I want to know if its possible to use the same socket to transfer two things at the same time.
// set up input stream for objects input = new BufferedReader(new InputStreamReader(clientsoc.getInputStream())); // set up output stream for objects output = new PrintWriter(new OutputStreamWriter(clientsoc.getOutputStream())); output.println(nickName + " joined the chat."); output.flush();// flush output buffer to send header information
I was developing a chat, now I want to implement the FTP function in it, that is, unable a user to both chat and send a file. What must I do, i have already implemented the chat part, but I am not sure , whether to create a new socket, or new streams or just use the same streams as above.
Thanks for your help.