GCDAsyncSocketManager icon indicating copy to clipboard operation
GCDAsyncSocketManager copied to clipboard

socket did write data while server client can't receive it

Open albertcsg opened this issue 7 years ago • 2 comments

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.

albertcsg avatar Jun 28 '17 10:06 albertcsg

Hi @ajjing , you should check the client is whether send the message when socket is reconnected

Yuzeyang avatar Jun 29 '17 02:06 Yuzeyang

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.

albertcsg avatar Jun 29 '17 09:06 albertcsg