0

I am looking for an answer to the last questions in the quote

This is in response to this thread:

Since these are short messages (< MSS), I guess the stack may be implementing Nagle's algorithm. Is the server doing some kind of delayed ACKs? If possible you should capture a trace and see if there are pending acknowledgements from the other side. In either case, TCP_NODELAY should help.

(1) What does ACK stand for? I googled it but couldn't find a definition (2) I will give the TCP_NODELAY that you and Nikolai suggested a shot and mark answered if it does indeed answer the question. Thanks for the help so far!

ACK is tcp acknowledgement. Instead of sending an ACK for each segment, the server may be waiting to bunch them. If the client implements Nagle's algo, it'd be waiting for an ACK before it sends segments with < MSS. In a TCP trace, you'll have to look for an ACK number in the TCP header and co-relate it to the SEQ number to see if this is happening. Or you can post a snippet of the capture here.

Ok, I updated the question to show the run method in my thread that creates the socket as well as the Java server. You will see that I had socketClient.setTcpNoDelay(true); in there already, but it wasn't fixing it. The documentation has that it should be socketClient.setTcpNoDelay(on); but then I need to initialize on. I am a bit perplexed as to what I should initialize "on" as to make socketClient.setTcpNoDelay(on); work?

in regards to the TCP trace, do I do that from android (client) or computer (server) side? and where/how do I implement that? would it just be socketClient. ?

Additional Info:

  • I am developing in Eclipse
  • My TCP client (android) is posted in the linked question
  • My TCP server (java) is posted in the linked question
Community
  • 1
  • 1
Nissi
  • 205
  • 3
  • 13

1 Answers1

2

I'm not sure if the headline relates to the question you're asking.

If we stick to the headline: "How to get android tcp trace" you can use software like http://www.wireshark.org/.

Install it on your development machine and make sure, your dev device or emulator uses the internet connection of your dev machine.

this is how you get the tcp trace the easiest way (imho)

k-deux
  • 493
  • 3
  • 13