I\'m programming an Server-Client Software, where the client connects to the server with an port request, the server opens a new port and sends back the new port number. Then th
You are sending a string of one size, yet on the other side you are reading the string of 1024 bytes - which you never sent. This will not do. You should either serialize string using serialize() method, or, if you want to send raw string bytes, send string length as a separate part of the message.