CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    May 2005

    recvfrom() question


    with the recvfrom() api call, it there a theoretical or physical limit to amount of data read from the socket?

    does the tcp layer gurantee all data is reassembled and ordered correctly before being making the data available on the socket so that some application can read the data all at once?

    In the following:
    The recvfrom() function shall return the length of the message written to the buffer pointed to by the buffer argument. For message-based sockets, such as [RS] [Option Start] SOCK_RAW, [Option End] SOCK_DGRAM, and SOCK_SEQPACKET, the entire message shall be read in a single operation. If a message is too long to fit in the supplied buffer, and MSG_PEEK is not set in the flags argument, the excess bytes shall be discarded. For stream-based sockets, such as SOCK_STREAM, message boundaries shall be ignored. In this case, data shall be returned to the user as soon as it becomes available, and no data shall be discarded.
    In the SOCK_STREAM case, what exactly does "message boundaries shall be ignored." mean?

    Are there other technicalities to be considered when ready large data?
    This is on linux/unix OS.
    Last edited by Moore; August 31st, 2009 at 09:48 AM. Reason: addition of OS details

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.