jdiehl / async-network Goto Github PK
View Code? Open in Web Editor NEWCocoa and iOS Socket Networking Evolved
Home Page: http://jdiehl.github.com/async-network
License: MIT License
Cocoa and iOS Socket Networking Evolved
Home Page: http://jdiehl.github.com/async-network
License: MIT License
Hello Jonathan,
Have you tried to build AsyncNetwork framework iOS x86_64 in Xcode 6+?
I modified your setting to generate AsyncNetwork framework for iOS but got
ld warning:
/MyProjectName/AsyncNetwork.framework/AsyncNetwork, missing required architecture x86_64 in file /MyProjectName/AsyncNetwork.framework/AsyncNetwork (2 slices)
Undefined symbols for architecture x86_64:
"OBJC_CLASS$_AsyncClient", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Thank you for precious time on my problem.
I will also give you an update if any progress on my side.
Hello Jonathan,
I need a little help if possible with two things - running the examples and console debugging
Thanks
Garry
Hello Jason,
In AsyncServer and AsyncClient, sendCommand method will send object to all connected AsyncConnections.
Is it possible to send object to specific AsyncConnection? For example, the API will look like
With your permission, I can write this method and you can review it.
P.S. I don't know if there is a "Feature" to create in Github. So I use "Issues" instead. Sorry for any inconvenience.
hi pls can help me to set port and host on client and server pls
Add a Ruby / PHP / JavaScript script that demonstrates how AsyncNetwork can communicate with backend scripting languages.
2232 #bug
When setting autoConnect to TRUE in AsyncClient and start,
The error is "Connection refused".
This only happens when the server does not exist.
Is it normal situation?
Thank you.
Hello Jonathan,
It does not work when using AsyncServer and AsyncClient through Bluethooth( it works through WiFi ). Then I found the following links about in order to through Bluetooth, includesPeerToPeer property sets to TRUE on NSNetService(AsyncServer) and NSNetServiceBrowser(AsyncClient). However, after setting this property before AsyncClient start or AsyncServer start, the devices still cannot see each other. Can you take a look if available?
The links:
https://developer.apple.com/library/ios/qa/qa1753/_index.html
https://developer.apple.com/library/ios/documentation/Networking/Conceptual/NSNetServiceProgGuide/Articles/PublishingServices.html
Thank you for helping.
Seems CocoaAsyncSocket files are missing. I’ve compiled using the makefile and added the framework to the project folder and Embedded Binaries and Linked Frameworks and Libraries. Running the project results in 'GCDAsyncSocket.h' file not found. Not sure what I’m missing.
label:bug
`
Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x1804d5bd0 objc_msgSend + 16
1 pos-offline 0x100980e9c -[AsyncClient
netServiceBrowser:didFindService:moreComing:] (AsyncClient.m:163)
2 CFNetwork 0x181536f00 -[NSNetServiceBrowser _dispatchCallBack:flags:error:] + 784
3 CFNetwork 0x18146400c _BrowseReply(_DNSServiceRef_t*, unsigned int, unsigned int, int, char const*, char const*, char const*, void*) + 576
4 libsystem_dnssd.dylib 0x1809aff14 handle_browse_response + 156
5 libsystem_dnssd.dylib 0x1809ae00c DNSServiceProcessResult + 620
6 CFNetwork 0x181463974 _SocketCallBack(__CFSocket*, unsigned long, __CFData const*, void const*, void*) + 32
7 CoreFoundation 0x180e115b0 __CFSocketPerformV0 + 1096
8 CoreFoundation 0x180e0cefc CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24
9 CoreFoundation 0x180e0c910 __CFRunLoopDoSources0 + 412
10 CoreFoundation 0x180e0a690 __CFRunLoopRun + 724
11 CoreFoundation 0x180d39680 CFRunLoopRunSpecific + 384
12 GraphicsServices 0x182248088 GSEventRunModal + 180
13 UIKit 0x185bb0d90 UIApplicationMain + 204
`
This crash stack, I think there maybe a issue of serviceBrowser's delegate
Would be great if the framework was made available on CocoaPods :-)
=== BUILD TARGET AsyncNetwork OF PROJECT AsyncNetwork WITH THE DEFAULT CONFIGURATION (Release) ===
** BUILD FAILED **
The following build commands failed:
CompileC build/AsyncNetwork.build/Release/AsyncNetwork.build/Objects-normal/x86_64/GCDAsyncSocket.o ThirdParty/CocoaAsyncSocket/GCD/GCDAsyncSocket.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/AsyncNetwork.build/Release/AsyncNetwork.build/Objects-normal/x86_64/GCDAsyncUdpSocket.o ThirdParty/CocoaAsyncSocket/GCD/GCDAsyncUdpSocket.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
=== BUILD TARGET AsyncNetworkIOS OF PROJECT AsyncNetwork WITH THE DEFAULT CONFIGURATION (Release) ===
** BUILD FAILED **
The following build commands failed:
CompileC build/AsyncNetwork.build/Release-iphoneos/AsyncNetworkIOS.build/Objects-normal/armv7/GCDAsyncUdpSocket.o ThirdParty/CocoaAsyncSocket/GCD/GCDAsyncUdpSocket.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/AsyncNetwork.build/Release-iphoneos/AsyncNetworkIOS.build/Objects-normal/armv7/GCDAsyncSocket.o ThirdParty/CocoaAsyncSocket/GCD/GCDAsyncSocket.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
=== BUILD TARGET AsyncNetworkIOS OF PROJECT AsyncNetwork WITH THE DEFAULT CONFIGURATION (Release) ===
** BUILD FAILED **
The following build commands failed:
CompileC build/AsyncNetwork.build/Release-iphonesimulator/AsyncNetworkIOS.build/Objects-normal/i386/GCDAsyncSocket.o ThirdParty/CocoaAsyncSocket/GCD/GCDAsyncSocket.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/AsyncNetwork.build/Release-iphonesimulator/AsyncNetworkIOS.build/Objects-normal/i386/GCDAsyncUdpSocket.o ThirdParty/CocoaAsyncSocket/GCD/GCDAsyncUdpSocket.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
cp: build/Release/AsyncNetwork.framework/AsyncNetwork: No such file or directory
cp: build/Release/AsyncNetwork.framework/Modules: No such file or directory
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: build/Release-iphoneos/AsyncNetworkIOS.framework/AsyncNetworkIOS (No such file or directory)
Hello Jonathan,
It seems that in AsyncNetworkIOS.framework AsyncServer's sendCommand doesn't work. It sounds weird because in ClientServer example, AsyncNetServer's sendCommand works, which uses AsyncNetwork.framework. Would you mind to confirm this potential issue? At same time I will keep testing and update if any new evidence. Please let me know if any problem. Thank you so much for helping.
We are trying to use AsyncNetwork in a native osx node.js module and cannot quite get it to work. Our node.js module does initialize the AsyncServer fine, but then no signals are ever fired..
Would it be possible to have one example without AppDelegate. I quess it would need to initialize the needed runloops and queues so that AsyncNetwork can work?
To whom it may concern,
After upgrading to iOS 8, the device cannot find each other.
But if connecting with WiFi, the device can.
Do you have this issue?
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.