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
21
votes
2 answers

Not able to receive response of the sent UDP packets using GCDAsyncSocket

I am making an app to send UDP packets in order to switch on a LED bulb. I have been able to perform all the actions when I am connecting to the Ad-hoc created by the Wifi bridge. Now, I want to configure the Wifi bridge so that it can connect to…
Yuyutsu
  • 2,509
  • 22
  • 38
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
4
votes
1 answer

iOS devices not receiving UDP multicast using GDAsyncUdpSocket

The code below is intended to receive UDP multicast messages on 239.255.255.250 and simply NSLog the contents of the message. If I address a message to the IP of the iOS device (i.e. from a terminal echo foo | nc -u 10.1.10.249 1900) the message…
TomH
  • 2,950
  • 2
  • 26
  • 49
3
votes
1 answer

Swift example for GCDAsyncSocketDelegate

Refer to this post I have some issues while receiving data from GCDAsyncSocket and can't find a working Swift example. import UIKit import CocoaAsyncSocket class DiscoveryViewControllerTest: UIViewController, GCDAsyncSocketDelegate{ let host =…
PascalS
  • 975
  • 1
  • 16
  • 40
3
votes
1 answer

iOS - GCDAsyncUdpSocket Throwing Error Domain=NSPOSIXErrorDomain Code=65 "No route to host"

Sometimes I am getting this error Error Domain=NSPOSIXErrorDomain Code=65 "No route to host" UserInfo={NSLocalizedDescription=No route to host, NSLocalizedFailureReason=Error in send() function.} when opening udp socket in some routers. I…
JLT
  • 3,052
  • 9
  • 39
  • 86
3
votes
0 answers

warning 'no explicit ownership' Issue Archive Project XCode

in Xcode 7.2.1 I have an issue when I archive my project, my app using WebSocket and I'm using the CocoaAsyncSocket Library, the app runs on Simulator or Any device but when archive, xcode show me this errors warnings: in the class…
2
votes
1 answer

How can I stream audio using UDP sockets in iOS swift?

I am really new to this networking concept, but I have to stream a audio file using the UDP socket, and after searching for a week I have not really got anything useful. I have used CocoaAsyncSocket, and tried to send a string from the sender app to…
K. Mitra
  • 483
  • 7
  • 17
2
votes
1 answer

Receiving UDP messages

I have problem with receiving messages on specific port. Sending is working fine. The code looks like that : import Foundation import CocoaAsyncSocket class InSocket: NSObject, GCDAsyncUdpSocketDelegate { //let IP = "192.168.1.196" let…
Wisniatt
  • 21
  • 5
2
votes
0 answers

often missing udp data when receive broadcast udp by GCDAsyncUdpSocket

when I use GCDAsyncUdpSocket to receive the broadcast data,I can receive the data on my Ipad, iphone6s,iphone6,and they are all ok.But I ofen missing the broadcast data when I use my Iphone4s,Iphone5.here is my code - (void)viewDidLoad { [super…
pelsor
  • 21
  • 2
2
votes
1 answer

Disable WiFi assist UDP transfer on iOS 9

I want to send UDP packages in a local network using GCDAsyncUdpSocket. My fear is that at some point UDP packages will be sent via LTE because of the newly introduced "WiFi assist" from iOS 9. Is there some way I can pretend iOS 9 from passing my…
DeveloBär
  • 673
  • 8
  • 20
2
votes
1 answer

UDP broadcast using GCDAsyncUdpSocket through all available Network Interfaces

I am using GCDAsyncUdpSocket for broadcasting UDP packets for searching my NAS devices. Below is the code snippet for sending and receiving UDP packets NSString *broadCastAddress = @"255.255.255.255"; NSInteger udpPort = 8097; GCDAsyncUdpSocket …
Prashant
  • 244
  • 2
  • 16
2
votes
0 answers

GCDAsyncUdpSocket, how to know when you don't receive data

I'm working on an iOS application. I have a target that will send me a response anytime I send it data. I've implemented GCDAsyncUdpSocket and I can send and receive data without a problem. I would like to handle the case when data is not sent back…
Ben Adams
  • 21
  • 2
2
votes
0 answers

How to listen UDP Packets without send request to Server use GCDAsyncUdpSocket in iOS

I want to make an application that is able to listen on the specific port without send any request to Server. That means, another app will broadcast data every 10s and my app needs to listen that broadcast without send any request to that other app.…
NTNT
  • 541
  • 1
  • 7
  • 18
2
votes
2 answers

iOS swift application using GCDAsyncUdpSocket

I'm very new to building iOS apps. I'm trying to make a class to receive udp multicast messages, but I can't seam to get it working at all... class Discovery : GCDAsyncUdpSocketDelegate{ var udpSocket:GCDAsyncUdpSocket!; init() { …
cholewa1992
  • 863
  • 1
  • 7
  • 16
2
votes
0 answers

Large data with GCDAsyncUdpSocket on iOS

I am trying to make a chat application which will use UDP connection.Using GCDAsyncUdpSocket from here i am able to connect and send small text to another device with this function - (void)sendData:(NSData *)data toHost:(NSString *)host …
souvickcse
  • 7,742
  • 5
  • 37
  • 64
1
2 3