Questions tagged [gcdasyncudpsocket]

`GCDAsyncUdpSocket` is an open source UDP/IP socket networking library

Part of the open source CocoaAsyncSocket repository, this library is:

  • Native objective-c, fully self-contained in one class.

  • Full delegate support.

  • Queued non-blocking send and receive operations, with optional timeouts.

  • Support for IPv4 and IPv6.

  • Fully GCD based and Thread-Safe

34 questions
1
vote
0 answers

How to stop GCDAsyncUdpSocket send command?

I am using GCDAsyncUdpSocket for communication between my app and some smart-home hardware, and I have a problem with stopping a certain function. Logic goes something like this: Send a command If you didn't receive feedback from the hardware,…
vla
  • 11
  • 2
1
vote
0 answers

Not able to receive data from Wemo device with UPNP request swift

I have Wemo belkin device in my local network i'm sending data with upnp call but i'm not able to receive reponse from wemo device. Here is my code : class PluginBelkinViewController: UIViewController, GCDAsyncSocketDelegate,…
YouSS
  • 560
  • 7
  • 20
1
vote
0 answers

DIAL Discovery with GCDAsyncUdpSocket

I am trying to use GCDAsyncUdpSocket to discover DIAL devices on a network. I have successfully used Netflix's official C++ client to discover devices, as specified here, but would like to avoid using C++ or Objective-C++ classes in my Swift…
diatrevolo
  • 2,782
  • 26
  • 45
1
vote
0 answers

I am not able to find the similar discovery code for iphone

Here i am giving the code. I am trying to make similar code in iPhone. But not able to do it correctly. Can anyone help me for that. It is server discovery code. Have tried with UDP Socket code also but not getting actual result. Need to get it work…
Nisarg Raval
  • 160
  • 12
1
vote
0 answers

Sending udp broadcast from iPhone. Only works in a debugger mode. Not working when i install the same IPA

Sending udp packets and listening data from the broadcast address using GCDAsyncudpSocket. It is working fine when I run the application from the debugger mode from mac OS X Yosmite(Xcode -> device ipad air 8.2). It is not working when I install the…
Ambiga
  • 27
  • 6
1
vote
0 answers

On iOS, how do you use GCDAsyncUdpSocket to listen to two ports?

I'm using GCDAsyncUdpSocket on iOS (successfully) to send and receive data using UDP starting it as follows: udpSocket = [[GCDAsyncUdpSocket alloc] initWithDelegate: self delegateQueue: dispatch_get_main_queue()]; NSError *error; BOOL result =…
Mike
  • 3,084
  • 1
  • 25
  • 44
0
votes
0 answers

I Am Getting Error in UDP Socket Programming For Calculator

I Am Getting Error in UDP Socket Programming For Calculator How TO solve below mention error i am facing issue in connection This Is client side code enter image description here This Is server side code page 1 page 2 I Am Receiving This Error Any…
0
votes
1 answer

"Type of expression is ambiguous" error about UDP socket with GCD in Swift (DispatchQueue)

When I coding TCP... socket = GCDAsyncSocket(delegate: self, delegateQueue: DispatchQueue.main) That's good But when I coding UDP... udpSocket = GCDAsyncUdpSocket(delegate: self, delegateQueue: DispatchQueue.main) the error says Type of expression…
0
votes
1 answer

GCDAsyncUdpSocket Socket Closes In between sending 255 packets

I have a module where I have to discover by sending a packets to the 255 IP addresses. eg. Connected IP : 192.188.2.1 then I have to send a packet changing the last value i.e. var HOST = "192.188.2.1" var arr = HOST.components(separatedBy: ".") for…
niravdesai21
  • 4,818
  • 3
  • 22
  • 33
0
votes
0 answers

enable to list udp port in xcode 9 for an ios app by GCDAsyncUdpSocket

I am trying to listen to a udp port from my ios app by GCDAsyncUdpSocket and keep getting this error: UDP connection error on port 60834 becuase Operation not permitted from GCDAsyncUdpSocket it looks like I need to disable sandbox on my app…
0
votes
1 answer

How to "connectToHost:" and "acceptOnPort:" on same GCDAsyncSocket object?

I'm trying to "send to" and "receive from" on same GCDAsyncSocket object, but it return's error as Attempting to accept while connected or accepting connections. Disconnect first. while trying to initialising the object. My Code…
Anand Kore
  • 1,300
  • 1
  • 15
  • 33
0
votes
1 answer

GCDAsyncUdpSocket don't receive any data

I'm working on UDP transmission of audio data. I'm using the CocoaAsyncSocket-GCDAsyncUdpSocket. When my project runs on the iPhone 6 I can just receive part of the data. A few seconds later the app can't receive data anymore, but it can still send…
Devil
  • 1
  • 1
0
votes
2 answers

GCDAsyncUDPSocket: Not receiving any data though it is successfully sent

I am trying to create a UDP socket and send data to a broadcasting port so that I can receive the same on other devices in the same WiFi network. I am calculating the IP address of broadcasting port as given in the accepted answer here. After that I…
Yogi
  • 3,578
  • 3
  • 35
  • 56
0
votes
1 answer

How to continuously send udp packets by use GCDAsyncUdpSocket

I use GCDAsyncSocket to send images in my application.The images are big,so I split its data to many small packets which save in a NSMutablearray called sort. GCDAsyncUdpSocket *sendSocket; sendSocket = [[GCDAsycUdpSocket alloc]…
X.Rodi
  • 43
  • 10
0
votes
1 answer

Error when comparing NSString generated from NSUTF8StringEncoding

I use my app to receive data by using this method: -(void)udpSocket:(GCDAsyncUdpSocket *)sock didReceiveData:(NSData *)data fromAddress:(NSData *)address withFilterContext:(id)filterContext { NSLog(@"didReceiveData"); NSString* input =…