Note that there are some explanatory texts on larger screens.

plurals
  1. POError in receiving data in C# client socket from java server socket
    primarykey
    data
    text
    <p>I am creating a Socket connection with C# client socket and Java Server Socket. When i am sending data from client socket,the server socket is properly receiving that data. But when i am trying to send data back to Client socket from Server socket it is getting hanged on client side in receiving data.</p> <p>Client Side Code(In C#.net)</p> <pre><code> clientSocket = new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp); string hostName = System.Net.Dns.GetHostName(); System.Net.IPHostEntry hostEntry = System.Net.Dns.GetHostEntry(hostName); System.Net.IPAddress[] ipAddresses = hostEntry.AddressList; System.Net.IPEndPoint remoteEP = new System.Net.IPEndPoint(ipAddresses[ipAddresses.Length - 1], port); clientSocket.Connect(remoteEP); string sendData = inputFilePath; byte[] byteDataSend = System.Text.Encoding.ASCII.GetBytes(sendData); clientSocket.Send(byteDataSend); int receivedBufferSize = clientSocket.ReceiveBufferSize; byte[] recivedData = new Byte[receivedBufferSize]; int receivedDataLength = clientSocket.Receive(recivedData); string stringData = Encoding.ASCII.GetString(recivedData, 0, receivedDataLength); textFilePath = stringData; Console.Write(stringData); clientSocket.Close(); </code></pre> <p>Server Socket Code (In Java)</p> <pre><code> Socket connection = server.accept(); BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); fileName = in.readLine(); convertedFile =runConverter.convertDocumet(fileName); byte[] sendingData = convertedFile.getBytes("US-ASCII"); DataOutputStream dos = new DataOutputStream(connection.getOutputStream()); dos.write(sendingData, 0, sendingData.length); </code></pre> <p>Tell me what is problem?? Please help...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload