mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-07 09:48:04 +01:00
WebSocketImpl::sendBytes() now uses FRAME_BINARY if given flags are all zero.
This commit is contained in:
parent
93e2ed831e
commit
1f8fcaacc0
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WebSocketImpl.cpp
|
// WebSocketImpl.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.4/Net/src/WebSocketImpl.cpp#6 $
|
// $Id: //poco/1.4/Net/src/WebSocketImpl.cpp#8 $
|
||||||
//
|
//
|
||||||
// Library: Net
|
// Library: Net
|
||||||
// Package: WebSocket
|
// Package: WebSocket
|
||||||
@ -73,6 +73,7 @@ int WebSocketImpl::sendBytes(const void* buffer, int length, int flags)
|
|||||||
Poco::MemoryOutputStream ostr(frame.begin(), frame.size());
|
Poco::MemoryOutputStream ostr(frame.begin(), frame.size());
|
||||||
Poco::BinaryWriter writer(ostr, Poco::BinaryWriter::NETWORK_BYTE_ORDER);
|
Poco::BinaryWriter writer(ostr, Poco::BinaryWriter::NETWORK_BYTE_ORDER);
|
||||||
|
|
||||||
|
if (flags == 0) flags = WebSocket::FRAME_BINARY;
|
||||||
writer << static_cast<Poco::UInt8>(flags);
|
writer << static_cast<Poco::UInt8>(flags);
|
||||||
Poco::UInt8 lengthByte(0);
|
Poco::UInt8 lengthByte(0);
|
||||||
if (_mustMaskPayload)
|
if (_mustMaskPayload)
|
||||||
|
Loading…
Reference in New Issue
Block a user