Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Logging from Mono
20:26:02.7377190 - null - ChangeState(Disconnected, Connecting)
20:26:06.5976270 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - WS Connecting to: ws://signalrsamples.azurewebsites.net:80/signalr/connect?transport=webSockets&clientProtocol=1.4&connectionToken=NCFf9LEvzP%2FitH5sIzCh3%2FXIwL8C%2FSTaIx4EMtL7NFZ8SNoPFUf4WGl9q3E8c2fO%2B3uUjhNsb4a1lAT5vghU2vnUj8INW563M56TPGpUAc3wZcjartMDMtASYpJRALF6&connectionData=[{"Name":"HubConnectionAPI"}]
AFTER _webSocket.ConnectAsync
System.Net.WebSockets.ClientWebSocket
Open
BEFORE ProcessWebSocketRequestAsync
IN ProcessWebSocketRequestAsync
IN while
IN messageRetriever 4096, , System.Threading.CancellationToken
remaining:0
headerBuffer: 129 47 0 0 0 0 0 0 0 0 0 0 0 0
WireToMessageType:1
length:47
isMasked:False
WebSocketMessageType:Text
receiveResult-1: CS=, CSD=, C=0, EOM=False, MT=Text;
remaining:47
WireToMessageType:1
WebSocketMessageType:Text
receiveResult-2: CS=, CSD=, C=47, EOM=True, MT=Text;
incomingMessage.MessageType=Text
incomingMessage.Data={"C":"d-57FEC584-R,3|b,0|c,1|d,0","S":1,"M":[]}
20:26:07.7644810 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - WS: OnMessage({"C":"d-57FEC584-R,3|b,0|c,1|d,0","S":1,"M":[]})
IN while
IN messageRetriever 4096, , System.Threading.CancellationToken
remaining:0
headerBuffer: 1 39 0 0 0 0 0 0 0 0 0 0 0 0
WireToMessageType:1
length:39
isMasked:False
WebSocketMessageType:Text
receiveResult-1: CS=, CSD=, C=0, EOM=False, MT=Text;
remaining:39
WireToMessageType:1
WebSocketMessageType:Text
receiveResult-2: CS=, CSD=, C=39, EOM=False, MT=Text;
remaining:0
headerBuffer: 0 102 0 0 0 0 0 0 0 0 0 0 0 0
WireToMessageType:0
length:102
isMasked:False
WebSocketMessageType:Close
receiveResult-3: CS=31522, CSD=H":"HubConnectionAPI","M":"displayMessage","A":["eecf0b2f-9906-43af-a9c3-de6d6dba3f97 OnConnected"]}, C=102, EOM=False, MT=Close;
incomingMessage.MessageType=Close
incomingMessage.Data=
20:26:09.5858410 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - ChangeState(Connecting, Connected)
20:26:09.6157310 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - WS: OnClose()
20:26:09.6460160 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - ChangeState(Connected, Reconnecting)
20:26:10.4270900 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - WS Connecting to: ws://signalrsamples.azurewebsites.net:80/signalr/reconnect?transport=webSockets&clientProtocol=1.4&connectionToken=NCFf9LEvzP%2FitH5sIzCh3%2FXIwL8C%2FSTaIx4EMtL7NFZ8SNoPFUf4WGl9q3E8c2fO%2B3uUjhNsb4a1lAT5vghU2vnUj8INW563M56TPGpUAc3wZcjartMDMtASYpJRALF6&messageId=d-57FEC584-R%2C3|b%2C0|c%2C1|d%2C0&connectionData=[{"Name":"HubConnectionAPI"}]
AFTER ProcessWebSocketRequestAsync
System.Net.WebSockets.ClientWebSocket
Closed
AFTER _webSocket.ConnectAsync
System.Net.WebSockets.ClientWebSocket
Open
BEFORE ProcessWebSocketRequestAsync
IN ProcessWebSocketRequestAsync
20:26:11.1983950 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - ChangeState(Reconnecting, Connected)
IN while
IN messageRetriever 4096, , System.Threading.CancellationToken
remaining:0
headerBuffer: 1 39 0 0 0 0 0 0 0 0 0 0 0 0
WireToMessageType:1
length:39
isMasked:False
WebSocketMessageType:Text
receiveResult-1: CS=, CSD=, C=0, EOM=False, MT=Text;
remaining:39
WireToMessageType:1
WebSocketMessageType:Text
receiveResult-2: CS=, CSD=, C=39, EOM=False, MT=Text;
remaining:0
headerBuffer: 0 102 0 0 0 0 0 0 0 0 0 0 0 0
WireToMessageType:0
length:102
isMasked:False
WebSocketMessageType:Close
receiveResult-3: CS=31522, CSD=H":"HubConnectionAPI","M":"displayMessage","A":["eecf0b2f-9906-43af-a9c3-de6d6dba3f97 OnConnected"]}, C=102, EOM=False, MT=Close;
incomingMessage.MessageType=Close
incomingMessage.Data=
20:26:11.2058010 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - WS: OnClose()
20:26:11.2059460 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - ChangeState(Connected, Reconnecting)
20:26:11.2074660 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - WS Connecting to: ws://signalrsamples.azurewebsites.net:80/signalr/reconnect?transport=webSockets&clientProtocol=1.4&connectionToken=NCFf9LEvzP%2FitH5sIzCh3%2FXIwL8C%2FSTaIx4EMtL7NFZ8SNoPFUf4WGl9q3E8c2fO%2B3uUjhNsb4a1lAT5vghU2vnUj8INW563M56TPGpUAc3wZcjartMDMtASYpJRALF6&messageId=d-57FEC584-R%2C3|b%2C0|c%2C1|d%2C0&connectionData=[{"Name":"HubConnectionAPI"}]
AFTER ProcessWebSocketRequestAsync
System.Net.WebSockets.ClientWebSocket
Closed
AFTER _webSocket.ConnectAsync
System.Net.WebSockets.ClientWebSocket
Open
BEFORE ProcessWebSocketRequestAsync
IN ProcessWebSocketRequestAsync
20:26:12.0042040 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - ChangeState(Reconnecting, Connected)
IN while
IN messageRetriever 4096, , System.Threading.CancellationToken
remaining:0
headerBuffer: 129 2 0 0 0 0 0 0 0 0 0 0 0 0
WireToMessageType:1
length:2
isMasked:False
WebSocketMessageType:Text
receiveResult-1: CS=, CSD=, C=0, EOM=False, MT=Text;
remaining:2
WireToMessageType:1
WebSocketMessageType:Text
receiveResult-2: CS=, CSD=, C=2, EOM=True, MT=Text;
incomingMessage.MessageType=Text
incomingMessage.Data={}
20:26:21.7004720 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - WS: OnMessage({})
IN while
IN messageRetriever 4096, , System.Threading.CancellationToken
remaining:0
headerBuffer: 129 2 0 0 0 0 0 0 0 0 0 0 0 0
WireToMessageType:1
length:2
isMasked:False
WebSocketMessageType:Text
receiveResult-1: CS=, CSD=, C=0, EOM=False, MT=Text;
remaining:2
WireToMessageType:1
WebSocketMessageType:Text
receiveResult-2: CS=, CSD=, C=2, EOM=True, MT=Text;
incomingMessage.MessageType=Text
incomingMessage.Data={}
20:26:31.8126250 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - WS: OnMessage({})
IN while
IN messageRetriever 4096, , System.Threading.CancellationToken
remaining:0
headerBuffer: 129 2 0 0 0 0 0 0 0 0 0 0 0 0
WireToMessageType:1
length:2
isMasked:False
WebSocketMessageType:Text
receiveResult-1: CS=, CSD=, C=0, EOM=False, MT=Text;
remaining:2
WireToMessageType:1
WebSocketMessageType:Text
receiveResult-2: CS=, CSD=, C=2, EOM=True, MT=Text;
incomingMessage.MessageType=Text
incomingMessage.Data={}
20:26:41.7404100 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - WS: OnMessage({})
IN while
IN messageRetriever 4096, , System.Threading.CancellationToken
remaining:0
headerBuffer: 129 2 0 0 0 0 0 0 0 0 0 0 0 0
WireToMessageType:1
length:2
isMasked:False
WebSocketMessageType:Text
receiveResult-1: CS=, CSD=, C=0, EOM=False, MT=Text;
remaining:2
WireToMessageType:1
WebSocketMessageType:Text
receiveResult-2: CS=, CSD=, C=2, EOM=True, MT=Text;
incomingMessage.MessageType=Text
incomingMessage.Data={}
20:26:51.9044650 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - WS: OnMessage({})
IN while
IN messageRetriever 4096, , System.Threading.CancellationToken
remaining:0
headerBuffer: 129 2 0 0 0 0 0 0 0 0 0 0 0 0
WireToMessageType:1
length:2
isMasked:False
WebSocketMessageType:Text
receiveResult-1: CS=, CSD=, C=0, EOM=False, MT=Text;
remaining:2
WireToMessageType:1
WebSocketMessageType:Text
receiveResult-2: CS=, CSD=, C=2, EOM=True, MT=Text;
incomingMessage.MessageType=Text
incomingMessage.Data={}
20:27:01.8015000 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - WS: OnMessage({})
IN while
IN messageRetriever 4096, , System.Threading.CancellationToken
remaining:0
headerBuffer: 129 2 0 0 0 0 0 0 0 0 0 0 0 0
WireToMessageType:1
length:2
isMasked:False
WebSocketMessageType:Text
receiveResult-1: CS=, CSD=, C=0, EOM=False, MT=Text;
remaining:2
WireToMessageType:1
WebSocketMessageType:Text
receiveResult-2: CS=, CSD=, C=2, EOM=True, MT=Text;
incomingMessage.MessageType=Text
incomingMessage.Data={}
20:27:11.8051820 - eecf0b2f-9906-43af-a9c3-de6d6dba3f97 - WS: OnMessage({})
IN while
IN messageRetriever 4096, , System.Threading.CancellationToken
remaining:0
@mattleibow

This comment has been minimized.

Copy link
Owner Author

@mattleibow mattleibow commented Oct 15, 2014

On line 18, the WireToMessageType is 1, aka text, and this is correctly translated to the WebSocketMessageType on line 21.

However, on line 46, there is a continuation frame, (FIN is set to 0), aka OPCODE 0, which is incorrectly translated into a Close on line 49.

See more info: http://tools.ietf.org/html/rfc6455#section-5.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment