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 to install and use CocoaAsyncSocket with swift

I did some research and it seems this is the best library to use for socket programming in ios applications. I went to their git hub page and installed cocoa pods. I created a pod file with the lines that are stated on the installation section here…
Ripley72
  • 1
  • 2
0
votes
1 answer

I can't write stream to NSData with protobuf-swift CodeOutputStream?

func onSocket(sock: AsyncSocket!, didConnectToHost host: String!, port: UInt16) { print("+++++++++++++ onSocket +++++++++++++") var data:NSData = NSData() ///Users/gameover/Works/Apple/SocketLab/SocketLab/SocketUtil.swift:33:13: Variable…
0
votes
1 answer

iOS tcp client delay

i try to send data over a tcp socket. I sent the data from my local pc (server: java based, nagle algorithmus disbled) to an sample ios tcp client. I try different libraries on the iPhone, the "CocoaAsyncSocket" and the "FastSocket". With both of…
Felix
  • 51
  • 5
0
votes
1 answer

swift CocoaAsyncSocket connectToHost method arguments error

I define properties as bellow: let addr:String = "192.168.31.218" let port :UInt16 = 8000 let timeout:Double = 5.0 var socket: GCDAsyncSocket! var errPtr : NSError? and I call the method as bellow: socket.connectToHost(addr, onPort: port,…
fcbflying
  • 693
  • 1
  • 7
  • 23
0
votes
1 answer

CocoaAsyncSocket UDP Simple Server & Client

I'm trying to start off and create a simple UDP server and client using CocoaASyncSocket. I've pretty much replicated the code in the examples from here UPDATE: I've tried running the provided examples but they don't seem to work with the host…
royherma
  • 4,095
  • 1
  • 31
  • 42
0
votes
1 answer

GCDAsyncUDPSocket: cannot get UDP multicast over IPv6 to work

I cannot get UDP multicast over IPv6 to work. The platform on which I'm trying to do this is iOS (using Swift). I have a GCDAsyncUdpSocket and configure it like this: self.socket!.setIPv4Enabled(false) self.socket!.setIPv6Enabled(true) do { try…
Stefan
  • 152
  • 6
0
votes
0 answers

iOS cocoaAsyncSocket get data parse String return null

I try to connect telnet to my telnet server port 23 in iOS. I use the "cocoaAsyncSocket" library. I can received the data from the telnet. But I try to decode to the string , the data is not my expect. It will show (null) If I use…
dickfala
  • 3,246
  • 3
  • 31
  • 52
0
votes
1 answer

CocoaAsyncSocket set the buffer size

I have written a VB.NET server that communicates with a silverlight client and a iOS client (using CocoaAsyncSocket). I'm sending and receiving JSON data, and pdf documents encoded as base64 strings. When receiving encoded pdf documents on the…
0
votes
1 answer

How to create thread listen server through cocoaasyncsocket in ios app

How to create thread to listen server through cocoaasyncsocket in ios app I am using cocoaasyncSocket from here: cocoaAsyncSocket i try sample code and push this code into AppDelegate.h and AppDelegate.m but when i am connected, this app don't…
0
votes
2 answers

iOS AsyncSocket to notify to two UIViewController

I am using AsyncSocket for a TCP connection. I have one TCP socket, but I have two UIViewControllers use this socket. As I know, there is only one delegate while I init the AsyncSocket. These two UIViewControllers both need to handle the callback…
srjohnhuang
  • 232
  • 5
  • 18
0
votes
0 answers

iOS-CocoaAsyncSocket: Image data not sending from client CocoaAsyncSocket

I am using GCD code of CocoaAsyncSocket-master source. I am using 'EchoServer' for running server version application and 'SimpleHTTPClient' client application for running on my iOS device. With the sample they given, I can run the desktop server…
Stella
  • 1,728
  • 5
  • 41
  • 95
0
votes
1 answer

Cocoaasyncsocket multiple write operations

I have implemented gcdasynsocket in my app and performing multiple write operations. The delegate didWriteDataWithTag is called twice but didreaddata is called only once (ie) for only one write operation. -(void)connectToHost:(NSString*)ip…
Karthick
  • 382
  • 1
  • 3
  • 23
0
votes
1 answer

CocoaAsyncSocket Apple Mach-O Linker Error

I need to receive TCP packets using CocoaAsyncSocket. When I'm importing that library to Xcode and trying to run my application, it gives me Apple Mach-O Linker Errors: Undefined symbols for architecture i386: "_kCFStreamErrorDomainMach", referenced…
user1996377
0
votes
1 answer

When I use AsyncUdpSocket object to send IP packet, It is not always working

I am using cocoaAsyncSocket. I got it from there. The AsyncUdpSocket object only help me send IP packet when I init this object. When I use [engineObject startSession] to call function in other controller, the function is working, but the…
Yi Jiang
  • 3,938
  • 6
  • 30
  • 62
0
votes
0 answers

CocoaAsyncSocket not giving socket disconnected when other party disconnects abruptly

Has anybody worked in cocoaAsyncSocket for a TCP connection??? I am not getting socket disconnected when TCP connection is abruptly disconnected by other party?? or can anyone suggest a good TCP connection library which is reliable?
user1010819
  • 2,691
  • 3
  • 15
  • 14