mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 00:07:59 +02:00
#550 WebSocket fragmented message problem
This commit is contained in:
@@ -101,6 +101,7 @@ void WebSocket::shutdown(Poco::UInt16 statusCode, const std::string& statusMessa
|
||||
|
||||
int WebSocket::sendFrame(const void* buffer, int length, int flags)
|
||||
{
|
||||
flags |= FRAME_OP_SETRAW;
|
||||
return static_cast<WebSocketImpl*>(impl())->sendBytes(buffer, length, flags);
|
||||
}
|
||||
|
||||
|
@@ -61,6 +61,7 @@ int WebSocketImpl::sendBytes(const void* buffer, int length, int flags)
|
||||
Poco::BinaryWriter writer(ostr, Poco::BinaryWriter::NETWORK_BYTE_ORDER);
|
||||
|
||||
if (flags == 0) flags = WebSocket::FRAME_BINARY;
|
||||
flags &= 0xff;
|
||||
writer << static_cast<Poco::UInt8>(flags);
|
||||
Poco::UInt8 lengthByte(0);
|
||||
if (_mustMaskPayload)
|
||||
|
Reference in New Issue
Block a user