GCDAsyncSocketManager
GCDAsyncSocketManager copied to clipboard
socket did write data while server client can't receive it
I run a server on my desktop(nc- lk 2000),the client on the iPad. The server can get what the client send,after I cut off my network and then reconnected,log in Xcode show GCDAsyncSocket connected success,and msg send success when I click sendMsg btn on my iPad,but I saw nothing on the terminal.only if i re nc -lk 2000 can I get data sended from the client. Could u please tell me how to fix it? thanks very much.
Hi @ajjing , you should check the client is whether send the message when socket is reconnected
Thank you for your answer.I'm sure after reconnected, the delegate method "-(void)socket:(GCDAsyncSocket *)sock didWriteDataWithTag:(long)tag" also printed "message send success".I clicked the sendMsg button several times but I got nothing from the server(unitl I re monitored the port 2000 again). I'd be grateful if you could have a try.