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 8649801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:38:58+00:00 2026-06-12T13:38:58+00:00

things are like this: I used AsyncSocket to connect with server. when the server

  • 0

things are like this:

I used AsyncSocket to connect with server. when the server send some bytes to client at a time, app will invoke (onSocket: didReadData: withTag:) method; Sometimes, because of the network or other reason, some bytes arrived and the rest bytes arrived later( which means some bytes are delayed).(timeOut = -1)

==================================

Question: how much times did the method(onSocket: didReadData: withTag: ) invoke?

1)only one time – it will wait automatically until the bytes are complete?

2)2 or more times – some arrived(invoke), other arrived(invoke)、、、、、like so?

===================================

which thoughts is right? plz geiv me some advice. Thanks very much.

  • 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-06-12T13:38:59+00:00Added an answer on June 12, 2026 at 1:38 pm

    OK, maybe it’s just like this.

    Transfer data on TCP: when you send 1000 bytes at a time, because of lag or other reasons, you may receive the 900 bytes first, but the TCP socket will wait the rest 100 bytes
    automatically. So if I use asyncSocket to transfer datas and set the timeout, during these seconds, I don’t need to deal with the lagged data.

    =========================

    EDIT

    maybe the title of ths question is not appropriate, no one cares the question.

    I used the method -readDataToLength: instead, first read header.length of data, and parse it, then read the body.length of data;

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

Sidebar

Related Questions

In documentation code I see some things like this: /* * @(#)File.java 1.142 09/04/01
This could save me so much time. Sometimes I find myself writing things like
I'm used to do doing things like this: <a href=Javascript:void(0); onclick=GetCommentForGeneralObservation(<%# Eval(ID) %>)> That
I used to set things like this when I wanted blank values. $blankVar =
I've typically just used constants in the past for things like this, say #define
In javascript it's possible to do things like this: SomeObject.somefunction(function(someparameters){ //do some things. });
I often see things like this in rails views: <% form_tag some_path do -%>
I always forget how to do things like this. I have a database table
Around the web I see people posting things like this: 2012-03-12 10:26:32.495 squirrels[330:707] cocos2d:
For instance, in Python, I can do things like this if I want to

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.