Java Socket fails to transmit data over the network
Posted
by Mark Griffin
on Stack Overflow
See other posts from Stack Overflow
or by Mark Griffin
Published on 2010-04-20T16:32:00Z
Indexed on
2010/04/20
16:33 UTC
Read the original article
Hit count: 334
I'm experiencing a bizarre problem with sockets between a Java Knopflerfish client bundle and a PHP (CLI, not web) server.
The client/server pair work fine when both are located on the localhost, and all data is transmitted successfully. However, when the Java client exists on a different machine, connections to the server are successful, but no data is received by the PHP script. Packet analysis confirms that the data sent by the Java client is received on by the server - PHP just seems to have problems getting its hands on it.
As a further note, I've done some tests with telnet as the client. The PHP server script receives all data fine from any host. This leads me to believe that the problem has something to do with the way java is setting up the socket or that there is some networking issue that I'm not familiar with. Any thoughts would be appreciated. Can post code samples if desired.
© Stack Overflow or respective owner