I am having an issue with Java ServerSocket and Python where I have an multithreaded echo server (Written in Java) that can communicate with multiple java clients. This all works fine.
When I try to connect with a python client, the python client can receive data from the server but when it sends data the server appears never to receive it.
I can only see the data at the server when i try to send 500K + bytes. While i can now see the data its is incomplete and out of sync.
I tested the follwing example code and it works fine with python: http://norwied.wordpress.com/2012/04/17/how-to-connect-a-python-client-to-java-server-with-tcp-sockets/
The only real difference is that in the code from the link it uses:
BufferedReader in = new BufferedReader(new InputStreamReader(client.getInputStream()));
PrintWriter out = new PrintWriter(client.getOutputStream(),
Where as in my server I use:
streamOut = new DataOutputStream(new BufferedOutputStream(s.getOutputStream()));
streamIn = new DataInputStream(new BufferedInputStream(socket.getInputStream()));
Could this be causing the issue ?