Client sent message every time when I press send button but Server receive message only first time. What is the issue in server
Server:
You have to make a read call from your server class in didReadData: delegate. Rest is fine. Use below code.
-(void)socket:(GCDAsyncSocket *)sock didReadData:(NSData *)data withTag:(long)tag {
[sock readDataWithTimeout:-1 tag:0];
NSString *msg = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"MSG: %@",msg);
}