So, I have a TCP client running on an Androidt tablet, and I have a C ++ server running on a PC.
I send data from my tablet to a PC, and the PC can read it very well, but when the PC tries to send a message to the tablet, the tablet simply does not receive anything. He is stuck in a call readLine(), trying to read something.
So, here are the java methods sending and waiting for a response
@Override
protected Void doInBackground(Void... arg0)
{
String msg = "";
Socket socket = null;
DataOutputStream outToServer = null;
BufferedReader msgFromServer = null;
try
{
socket = new Socket("192.168.20.100", 48501);
outToServer = new DataOutputStream( socket.getOutputStream() );
msgFromServer = new BufferedReader( new InputStreamReader( socket.getInputStream() ) );
DataInputStream iStrReader = new DataInputStream( socket.getInputStream() );
outToServer.writeBytes( "MainCamConnect" );
msg = msgFromServer.readLine();
Log.d( "NETWORK", msg );
socket.close();
}
catch( UnknownHostException e )
{
e.printStackTrace();
}
catch( IOException e )
{
e.printStackTrace();
}
return( null );
}
and the message sent from the PC is: "StartDelayTest \ n"
I know that the server can send a message just fine, because I tested it with a simple C ++ TCP client, and it worked fine, but when I run it on the tablet, the tablet cannot get anything
EDIT:
OS: Windows 7 64 bit Professional Version
EDIT 2:
wirehark , , IP-, ( Android)