+add utf-8 validation code, not hooked up properly yet
+ws autobahn / Add code to test websocket client compliance with the autobahn test-suite +Ping received with a payload too large (> 125 bytes) trigger a connection closure +cobra / add tracking about published messages +cobra / publish returns a message id, that can be used when +cobra / new message type in the message received handler when publish/ok is received (can be used to implement an ack system).
This commit is contained in:
@ -590,6 +590,17 @@ namespace ix
|
||||
std::string pingData(_rxbuf.begin()+ws.header_size,
|
||||
_rxbuf.begin()+ws.header_size + (size_t) ws.N);
|
||||
|
||||
// too large
|
||||
if (pingData.size() > 125)
|
||||
{
|
||||
std::string reason("reason control frame with payload length > 125 octets");
|
||||
// Unexpected frame type
|
||||
close(1002,
|
||||
reason,
|
||||
reason.size());
|
||||
return;
|
||||
}
|
||||
|
||||
if (_enablePong)
|
||||
{
|
||||
// Reply back right away
|
||||
|
Reference in New Issue
Block a user