SocketRocket
SocketRocket copied to clipboard
SRStatusCode 4001 use by applications not callback to application
My Server close the socket with code 4001. Then I receive it on - (void)handleCloseWithData:(NSData *)data function。But, I get the code SRStatusCodeGoingAway 1001。 And I found that (dispatch_data_get_size(_outputBuffer) - _outputBufferOffset) != 0 in the Call stack handleCloseWithData->closeConnection->_pumpWriting。Then the real _closeCode 4001 missed。 How can I fix this。
i get the same problem too. Who can give me a solution.
Got the same problem. I'm attempting to close socket with code 3501 (using method -(void)closeWithCode:reason:
), but I got a 1005 code instead in - (void)webSocket:(SRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(nullable NSString *)reason wasClean:(BOOL)wasClean;
.
Why the code we pass is getting lost during the closing?
I found the reason is my server.