Questions tagged [cocoaasyncsocket]

CocoaAsyncSocket is a TCP/IP socket networking library that wraps CFSocket and CFStream for Cocoa/Objective-C.

CocoaAsyncSocket is a TCP/IP socket networking library that wraps CFSocket and CFStream for Cocoa/Objective-C. More information at GitHub page

151 questions
19
votes
2 answers

Swift: Receive UDP with GCDAsyncUdpSocket

BACKGROUND: I want to be able to send and receive UDP packets between my iOS app and a server. The server echoes back every incoming message to the client the app. The server is tested and confirmed working. I have a StartViewController which…
0xRLA
  • 3,279
  • 4
  • 30
  • 42
10
votes
1 answer

GCDAsyncUdpSocket and multicast sending and receiving

In first approach I create client-server app ,based on sampleProject , which send some data to server. Legend: sender address = reciver ip port = reciver port reciver address = null since he is listening port = in my case…
Błażej
  • 3,617
  • 7
  • 35
  • 62
9
votes
0 answers

stream audio via UDP by using CocoaAsyncSocket in swift

I have a problem to send audio by CocoaAsyncSocket via UDP in swift. First of all I run below code to start listening 4444 UDP port. vlc --demux=rawaud --rawaud-channels=1 --rawaud-samplerate=48000 udp://@:4444 after that I run my application in…
7
votes
2 answers

How do I get didReadData within GCDAsyncSocket execute within the current RunLoop?

I'm trying to get a simple example working with GCDAsyncSocket, and am discovering that I'm missing certain bits of understanding and hope you fine people can help explain this. I've setup the GCDAsyncSocket stuff below: dispatch_queue_t mainQueue =…
Sebastian Dwornik
  • 2,526
  • 2
  • 34
  • 57
7
votes
4 answers

Can you call a javascript function from native code (not in a callback) using PhoneGap and iOS?

I'm hoping to be able to use PhoneGap for my app. I will have to build a custom protocol/plugin so that I can call Native methods from the Javascript. I know you can call a success function in the Javascript when the native code returns. What I…
tsdexter
  • 2,911
  • 4
  • 36
  • 59
7
votes
2 answers

NSPOSIXErrorDomain when binding to socket on macOS 10.12

I am playing with CocoaAsyncSocket in Swift to bind to a UDP socket and receive messages over the local network. I am initialising a socket, and trying to bind to a port but am getting a NSPOSIXErrorDomain error. Perhaps indicating some sort of…
james246
  • 1,884
  • 1
  • 15
  • 28
7
votes
1 answer

GCDAsyncSocket with Client Authentication

I have been using CocoaAsyncSocket to send data to our server without SSL. Now the server side has implemented SSL/TLS with client authentication. TO implement this in our app I was given the following three…
LoveMeSomeFood
  • 3,137
  • 7
  • 30
  • 53
7
votes
2 answers

AsyncSocket callbacks not being called in a swift class

GCDAsyncSocket delegates not being called in swift class, but works very well in UIViewController class. Below is my custom class code, in this class connect function will start socket connection and it's delegate will never called. I search on net…
user2021205
7
votes
1 answer

Socket is disconnected immediately after making connection by using GCDAsyncSocket library in iPhone application

I want to read and write data from OBD2 Wifi enabled Adapter which is used to read car data and fault codes. For that ,I'm using GGCDAsyncSocket Library for socket connection. You can download CocoaAsyncSocket Library source code But it maintains…
NSS
  • 721
  • 1
  • 10
  • 23
6
votes
2 answers

Why might an EventMachine outbound data buffer stop sending and just fill up forever (while other connections can still send)

I have an EventMachine server sending TCP data down to a Mac client (via GCDAsyncSocket). It always works flawlessly for a while, but inevitably the server suddenly stops sending data on a connection-by-connection basis. The connection is still…
6
votes
1 answer

GCDAsynSocketDelegate didReadData method is not called. Using GCDAsynSocket

I am trying to simply send and recieve a message using GCDAsyncSocket and cannot get it to work. I am successfully establishing the connection and writing messages, but when it comes to reading my delegate is never called. I am im using ios5 and…
Cyprian
  • 9,423
  • 4
  • 39
  • 73
6
votes
1 answer

UDP Broadcast/Device Discovery on iOS?

I am working on trying develop a means of discovering Logitech Harmony Hub devices on my local network, from an iOS app. The concept is inspired by this NODE.JS project, which seems to send out a UDP broadcast to the 255.255.255.255 address, and…
ZbadhabitZ
  • 2,753
  • 1
  • 25
  • 45
6
votes
1 answer

Receiving SSDP response using CocoaAsyncSocket in Swift

I'm trying to receive a SSDP response using swift with the library CocoaAsyncSocket (https://github.com/robbiehanson/CocoaAsyncSocket) I can successfully send the M-Search command to the multicast group and get a response, I've looked at the…
Wesley Elder
  • 181
  • 1
  • 9
5
votes
3 answers

Undefined symbols for architecture armv7? What does this error mean?

I just marked all of my CocoaAsyncSocket code as non-ARC code, and it's given me these 3 errors: Undefined symbols for architecture armv7: "_kCFStreamNetworkServiceTypeVoIP", referenced from: -[GCDAsyncSocket…
Andrew
  • 15,935
  • 28
  • 121
  • 203
5
votes
1 answer

CocoaAsyncSocket and reading data from a socket

On my TCP-socket based server, I send a packets over the stream where packets consist of a header specifying the number of bytes in the packet, followed by that number of bytes. For those familiar with Erlang, I'm simply setting the {packet, 4}…
randombits
  • 47,058
  • 76
  • 251
  • 433
1
2 3
10 11