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
0
votes
1 answer

how do i tell my uitableviewcontroller to reloadData in a asynch socket

I'm using cocoaAsyncSocket when i click on a button in my tableViewController to fetch the dat I want in the function didReadData to call reloadData of my tableView. how should get the reference of my tableView ? please tell me, if i should use…
Dany Y
  • 6,833
  • 6
  • 46
  • 83
0
votes
1 answer

AsyncSocket works on my simulator but not my partner's - connection cancelled error

My partner and I have checked out the exact same code, and we are both using the same network. When I try and connect to a socket using AsyncSocket, it works. When my partner does the exact same thing, it does not. I have tried Googling but I have…
Andrew Johnson
  • 13,108
  • 13
  • 75
  • 116
0
votes
0 answers

CocoaAsyncSocket Index out of range on data object in Swift iOS app

One of my users receives occasionally a strange index-out-of-range exception. This happens in the udpSocket callback of the CocoaAsyncSocket library. func udpSocket(_ sock: GCDAsyncUdpSocket, didReceive data: Data, fromAddress address: Data,…
Michael Konz
  • 503
  • 1
  • 3
  • 20
0
votes
1 answer

How to program a communication protocol with "iphone sockets"?

I've programmed a client-server application for Android and I'm doing the same for Iphone. The thing is that for the communication process, with the java server and the Android client, I've programmed something like this (in pseudo...): data =…
newlog
  • 1,050
  • 1
  • 11
  • 23
0
votes
1 answer

Server/Client not communicating correctly (CocoaAsyncSocket)

I've got a simple client & server application semi working with CocoaAsyncSocket. I can use the client to connect to the server, and can pass data back and forth between them and the delegate methods seem to fire correctly. My problem is that I can…
Kris
  • 349
  • 1
  • 2
  • 13
0
votes
1 answer

Switch from Sockets to cocoaasyncsockets (question related to string conversion)

This question is related to a iOS project written in ObjectiveC that makes use of some C++-Headers. I'm using this method to send messages to a server using TCP. As you can see, there is a c++ method called that modifies the string to conform to a…
Christoph
  • 1,965
  • 16
  • 35
0
votes
0 answers

Local server with custom host name

Is it possible to host a local server with a custom hostname in iOS? I am trying to create an app that needs a requirement for a local server, I tried different libraries to host a local server like GCDWebServer and Telegraph. But none of the…
Perseus
  • 1,546
  • 4
  • 30
  • 55
0
votes
1 answer

CocoaAsyncSocket and NativeScript issue

I'm writing a Nativescript Plugin for UDP comms based on CocoaAsyncSocket but my app is crashing when I try to perform any async operation in the context of this pod. It seems to be something related to the queues/threads on iOS x {N}, but I haven't…
0
votes
1 answer

Swift: Show UIAlert while waiting for semaphore

I'm using CocoaAsyncSocket pod to transfer data from measurement instrument to an iOS device. The transfer works pretty well, but I get in trouble, if I have to switch between different mobile instruments. If I need to change the instrument /…
PascalS
  • 975
  • 1
  • 16
  • 40
0
votes
1 answer

Send hexString Data through UDP

I'm developing an iOS app. I've come across a problem. I am trying to send a hexString data through UDP to an wifi camera, which will response while getting correct data. My code is shown below. However I can't get any response from my wifi camera.…
Michael Li
  • 11
  • 3
0
votes
2 answers

Xcode doesn't find CocoaPods module

I'm using the CocoaAsyncSocket library for an application I am writing. When I compile and run it on my own device there's no problem and Xcode is able to find CocoaAsyncSocket. However when I'm trying to Archive it won't compile and I get the error…
kraken108
  • 35
  • 4
0
votes
0 answers

CocoaAsyncSocket: Error creating iOS UDP socket when dispatch_sync(socketQueue, block) is called

I would like to write an iOS Swift app that connects to an UDP server locally. Here is the code I wrote using a library called CocoaAsyncSocket, however when I run it it does crash. I haven't found any similar high level API in Apple. The only thing…
mm24
  • 9,280
  • 12
  • 75
  • 170
0
votes
1 answer

CocoaAsyncSocket server won't start if called from another class

It's a simple socket server. If I remove Socket class and put serverSocket variable and startSocketServer function inside the ViewController class Socket server will be started to listening. I check by lsof -i :6000 command to determine if socket…
Vahid
  • 3,352
  • 2
  • 34
  • 42
0
votes
0 answers

Questions of using CocoaAsyncSocket to read socket data

I got the framework from CocoaAsyncSocke gibhub to read socket data from a server,but i can't read the correct jpg content, Can some one tell me what wrong in my code? The frame binary format of the socket. [binary format][2] -…
0
votes
1 answer

Receiving UDP broadcast data

I'm trying to receive broadcast UDP datagrams on iOS. I started to use the CocoaAsyncSocket library which seems pretty good. I'm using it like this: m_socket = [[GCDAsyncUdpSocket alloc] initWithDelegate:self…
Luca Carlon
  • 9,546
  • 13
  • 59
  • 91