BeginSend()

I've looked through the forums and understand that TCP/IP information (such as TCP acks) are inaccessible in .net. My question is, when using the BeginSend() method on .net sockets, at what point does the async callback method get called When the buffer is flushed Is there any correspondence between the async callback being called and TCP protocol events (like acks etc)




Answer this question

BeginSend()

  • Doug (MSA)

    Thanks guys, that pretty much answers my question. I have already an app-layer ack system :)

  • depp

    To summarize, if you want some sense of ACKs, you would have to implement such semantics at the application level.  This is slightly off topic, but if you ever want to learn more about the windows TCP/IP stack in general this whitepaper is a good starting place:
    http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/networking/tcpip03.mspx

  • Johnny Willemsen

    When the begin send is called, most typically, an I/O Completion port work item is queued on the socket. As soon as the socket copies the data to its internal buffers, the send succeeds. So there could be some data still in the pipeline
    when the send returns.

    Data can be buffered at the Socket level and at the TCP Level. So when the send
    succeeds it does not mean that all the data is sent and completly ack-ed by the
    server.

    If it is important to you then the server app can reqad the data send an
    APP level ack back to the sender

  • BeginSend()