Hello Everyone,
I am developing an Echoer program in which the client and the server side are inside the same
Java file (but inside different classes+main class separate). So basically there is a single (.java) file.
I want to transfer a short message over an already established TCP connection, to be more precise, I have already connected the client using Socket(ip, portnumber) to the Server (ServerSocket(portnumber)). However, now after linking the client to the server, in some other part of the code, I want to send a message (say, "hello") using the same connection, but I am unable to do so. I am getting an error saying, "Address already in use (Java.net.BindException)"
Please help,
Thanking you in anticipation,
Sanat