Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Unexpected Delay in TCP Streams

Unexpected Delay in TCP Streams

Scheduled Pinned Locked Moved C / C++ / MFC
questiondata-structuresjson
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SanShou
    wrote on last edited by
    #1

    I have a quick question (okay maybe not so quick) about timing and controlling the TCP/IP stack in windows. I developed a communications stack for an application that has to support large file tranports and smaller messages across TCP connection. The smaller (< 1K) control messages seem to work fine and the stack is able to communicate. However when I drop the big 10K message on the stack, it all seems to be writing correctly, however I am seeing a significant delay of 3 seconds between each 1k Window going out. (Note the TCP ACK comes back in around 9ms.) This 3 second delay (30 seconds total to send all 10K) seems a bit of a waste. I am going to continue to test and see if it is my machine but I believe it must be a property of the sockets. One other note is that if I send a continuous stream of the small control messages, there is no 3 second delay between packets. I set up the socket as an overlapped socket: m_Socket = WSASocket(AF_INET, SOCK_STREAM, IPPROTO_IP, NULL, 0, WSA_FLAG_OVERLAPPED); I then set the keep alive mode on, bind it to a local port, and then connect to the remote box. That all seems to work fine, except when I rely on the TCP window streaming mechanics I get that delay. The remote side even says that I have another 7K available in it's window that I could send. Is there some sort of TCP window parameter that I cannot find in the documentation?? Thanks, Brian If you start a fire for a man, he will be warm for a day. If you start that same man on fire, he will be warm for the rest of his life.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups