Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7548081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:36:58+00:00 2026-05-30T09:36:58+00:00

I feel I’m missing some fundamental info, however, the problem I’m facing is I’m

  • 0

I feel I’m missing some fundamental info, however, the problem I’m facing is I’m getting one data packet that consists of two merged other packets. Server API works correct, this merge happens only when multiple writes and read occur at the same time. So, the question is if a server performs several writes via socket, who is responsible for distinguishing where a packet starts, ends and where second packet starts? Me or CFReadStreamRead?

Currently, I’m using AsyncSocket that is a wrapper around CFNetwork but IMHO the problem is somehow related to CFReadStreamRead itself: sometimes it reads two packets as one, instead of reading them separately. I was unable to find relative examples and info about how the flow goes when multiple writes and reads occur at the same time, and do I need explicitly do something to grab the packet or do I need manually to split those packets from coming data stream? Though CFReadStreamRead already does that but maybe I’m missing smth.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T09:36:59+00:00Added an answer on May 30, 2026 at 9:36 am

    It’s not clear what you mean here by “packets” and I suspect you’re using the term very loosely. The place that packet (i.e. IP packet) boundaries are determined is at the network layer, which is well below any of the things you’re talking about.

    At the layer you’re talking about, all writes are going to be joined together. Bytes are bytes. A single write does not in any way suggest a single read. Multiple writes may map to a single read or vice versa. It is up to the protocol to indicate where boundaries are between things the protocol thinks of as separate messages. In the situation you’re describing, that means this is an issue between you and your server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I feel like I'm missing a fairly fundamental concept to WPF when it comes
I feel that the LaTeX syntax is quite easy to use. However, I'm starting
Feel like this should be something easy that I'm missing. I have a table
I feel that this question has been asked 10^78 times, but for some reason,
I feel that my shop has a hole because we don't have a solid
I feel that using GetEnumerator() and casting IEnumerator.Current is expensive. Any better suggestions? I'm
I feel that it should be something very simple and obvious but just stuck
Feel free to close this one if it s a duplicate. I couldn't find
i feel stupid asking that question, but it seems like i'm unable to find
Feel im being a little dense on this one, would be great if you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.