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
1
vote
0 answers

GCDAsyncSocket.h not found in LIFXKit framework

I installed LIFXKit from cocoapods, those are my pods: pod 'CocoaAsyncSocket' pod 'LIFXKit' When I build, I have this error : I used @import CocoaAsyncSocket; in my Bridging-Header.h but no luck PS : im using last xcode with swift 3
OuSS
  • 1,047
  • 1
  • 15
  • 23
1
vote
0 answers

CocoaAsyncSocket sent UDP but no response

infomation: I have a device on my local network, it is an UDP server and when I send "hello" to it I will get a "how are you" response, but I don't know the IP, so I have to send "hello" to each IP of my local network to find the device. problem:…
芮星晨
  • 123
  • 1
  • 9
1
vote
0 answers

Sending UDP packet with CocoaAsyncSocket

I'm trying to send a UDP packet with CocoaAsyncSocket. I've implemented the socket instance creation and the send method as follows: let IP = "192.168.2.255" let PORT:UInt16 = 6454 var socket:GCDAsyncUdpSocket! func sendPacket(){ socket =…
Jojo56400
  • 309
  • 3
  • 12
1
vote
0 answers

Using CocoaAsyncSocket to receive UDP in Swift iOS

I am trying to receive broadcast UDP packets on iOS. I've verified that the packets are being sent (I can see them in another iOS app on the same device). CocoaAsyncSocket seemed like the most straightforward library to do this with. I added the…
Spencer Ogden
  • 306
  • 1
  • 6
1
vote
0 answers

CocoaAsyncSocket processing hex values

I'm using CocoaAsyncSocket to process a fixed length header message. My node implementation is as follows var output = "\xA5\xA5" + jsonStr; socket.write(output); I intend to read the header first (\xA5\xA5) and then process the body of…
Jani
  • 1,400
  • 17
  • 36
1
vote
0 answers

CocoaAsyncSocket uploading issue (upload to FTP Server , always lost part of my data)

My ios app is using GCDAsyncSocket to communicate with my FTP Server,however when I try to upload some files to the server,it is very likely to lose a couple of bytes. Below is the general idea of my code : var bytesWritten : Int64 = 0 func…
Gocy015
  • 208
  • 3
  • 14
1
vote
1 answer

Parsing A UPnP Response In Swift?

This question may not need to be so specific, but I am working on a project that is searching for UPnP devices (working great). I get the data like so; func udpSocket(sock: GCDAsyncUdpSocket!, didReceiveData data: NSData!, fromAddress address:…
ZbadhabitZ
  • 2,753
  • 1
  • 25
  • 45
1
vote
0 answers

CocoaAsyncSocket connection is broken when we trigger power button of iOS7.x devices

I am using AsyncSocket (not GCDAsyncSocket) in my application. It works exceptionally well in all cases except one. i.e. When I trigger the power button of the device, the connection is broken. This is happening only for iOS 7.x devices but…
aios
  • 405
  • 5
  • 14
1
vote
1 answer

AsyncSocket: always listen to incoming TCP messages

I would like to have a service which connects via TCP to a server and then continuously listens to incoming data. I'm using CocoaAsyncSocket which I'm using in the following way: self.socket = [[GCDAsyncSocket alloc] initWithDelegate:self…
swalkner
  • 16,679
  • 31
  • 123
  • 210
1
vote
1 answer

iOS protobuf GCDAsyncSocket

I am writing a small app which requires sending protobuf message to a netty server via tcp, where CocoaAsyncSocket/GCDAsyncSocket is used. To do this, I use the following code: Message_LoginMessageRequest_Builder…
1
vote
0 answers

Reading unterminated data with CocoaAsyncSocket's GCDAsyncSocket

I am trying to create an app that opens a listening TCP socket and then reads all bytes written to the socket and then does something with those bytes. The server does not know the length of the data that will be written to the socket. Also, there…
PICyourBrain
  • 9,976
  • 26
  • 91
  • 136
1
vote
3 answers

Retrieving a string from a UDP server message

I'm using the CocoaAsyncSocket library in my Swift-based iOS app. I have created an async UDP socket to a UDP server on my network, and it sends back a reply. I'm reading this reply like this: func udpSocket(sock: GCDAsyncUdpSocket!, didReceiveData…
gosr
  • 4,593
  • 9
  • 46
  • 82
1
vote
0 answers

CocoaAsyncSocket / GCDAsyncSocket: close SSL/TLS session (back to unencrypted TCP connection) / establish second SSL session / renegotiate session

I have a problem connecting to a server over SSL. As soon as I execute a special command, the service on the server I'm talking to switches and looses the SSL session, forcing me to make a new SSL handshake. How can I do so with GCDAsyncSocket?…
arcud
  • 71
  • 1
  • 5
1
vote
4 answers

Showing Waiting Alert View At Load

I would like when my app starts for it to show an Alert view for about 5 seconds, then depending on the outcome of a background process, it will show another Alert view. The problem I am experiencing is that when I try to use Sleep to wait for a…
Remixed123
  • 1,575
  • 4
  • 21
  • 35
1
vote
0 answers

Adding SOCKS Proxy support in CocoaAsyncSocket

I added SOCKS ability to CocoaAsyncSocket. I first tried to do this on GCDAsyncSocket, but failed. For CocoaAsyncSocket, I simply set SOCKS properties on the read/write stream in this method (In GCDAsyncSocket, only iOS used read/write sockets using…
John Anthony
  • 405
  • 1
  • 5
  • 17