Comments (1)
The reason this is happening is because of the queueing mechanism. Essentially, GCDAsyncSocket allows you to do something like this:
[asyncSocket connectToHost:@"myServer.com" onPort:12345];
[asyncSocket writeData:myRequestData withTimeout:-1 tag:0];
[asyncSocket readDataToData:responseTermData withTimeout:-1 tag:0];
All the methods invoked above are asynchronous. So the socket isn't connected at the time the write & read requests are posted. The socket automatically queues them until the socket connects, and then dequeues them and processes them after the connection is up.
from cocoaasyncsocket.
Related Issues (20)
- Is this library supported for iOS 13+ ? HOT 2
- Error Domain=NSPOSIXErrorDomain Code=60 "Operation timed out" HOT 1
- [!] Error installing CocoaAsyncSocket [!] /usr/bin/git clone https://github.com/robbiehanson/CocoaAsyncSocket.git /var/folders/44/pdz2cl0561z4jh2377tl293h0000gp/T/d20221207-3976-gkz985 --template= --single-branch --depth 1 --branch 7.6.5 HOT 1
- π¦ ALL IN ONEπ
- crashed on iOS 16.1, SIGTRAP HOT 2
- App crash in Xcode 14 and iOS 16 HOT 6
- how to creat a unix domain socket on iOS device HOT 1
- the app references non-public selectors in cocoaAsyncSocket HOT 1
- [GCDAsyncSocket closeWithError:] crash, iOS16 HOT 4
- Not able to build the framework after upgrading Xcode to 14.3 HOT 1
- Not work with bitcode enable HOT 2
- GCDAsyncSocket with local ip address changed HOT 5
- socket gets disconnected with nil error, as soon as didAccept delegate is called HOT 2
- Privacy Manifest HOT 7
- Is there any plan to update TLS API to Network.framework? HOT 2
- crash about (null) in @objc TcpClient.socket(_:didRead:withTag:) () in Xcode HOT 1
- Crash: Thread 8: EXC_BAD_ACCESS (code=1, address=0x555555555555555d) HOT 6
- Increase macOS deployment target HOT 3
- Technically possible to implement getPeerCertificate and getCertificate ? HOT 1
- Lincense HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cocoaasyncsocket.