Library: Net
Package: WebSocket
Header: Poco/Net/WebSocketImpl.h
Direct Base Classes: StreamSocketImpl
All Base Classes: SocketImpl, StreamSocketImpl, Poco::RefCountedObject
Member Functions: acceptConnection, bind, bind6, close, connect, connectNB, frameFlags, getReceiveTimeout, getSendTimeout, listen, mustMaskPayload, receiveBytes, receiveFrom, receiveNBytes, secure, sendBytes, sendTo, sendUrgent, setReceiveTimeout, setSendTimeout, shutdown, shutdownReceive, shutdownSend
Inherited Functions: acceptConnection, address, available, bind, bind6, close, connect, connectNB, duplicate, error, getBlocking, getBroadcast, getKeepAlive, getLinger, getNoDelay, getOOBInline, getOption, getRawOption, getReceiveBufferSize, getReceiveTimeout, getReuseAddress, getReusePort, getSendBufferSize, getSendTimeout, init, initSocket, initialized, ioctl, lastError, listen, peerAddress, poll, receiveBytes, receiveFrom, referenceCount, release, reset, secure, sendBytes, sendTo, sendUrgent, setBlocking, setBroadcast, setKeepAlive, setLinger, setNoDelay, setOOBInline, setOption, setRawOption, setReceiveBufferSize, setReceiveTimeout, setReuseAddress, setReusePort, setSendBufferSize, setSendTimeout, shutdown, shutdownReceive, shutdownSend, socketError, sockfd
FRAME_FLAG_MASK = 0x80
MAX_HEADER_LENGTH = 14
WebSocketImpl(
StreamSocketImpl * pStreamSocketImpl,
bool mustMaskPayload
);
Creates a StreamSocketImpl using the given native socket.
virtual ~WebSocketImpl();
virtual SocketImpl * acceptConnection(
SocketAddress & clientAddr
);
virtual void bind(
const SocketAddress & address,
bool reuseAddress = false
);
See also: Poco::Net::SocketImpl::bind()
virtual void bind6(
const SocketAddress & address,
bool reuseAddress = false,
bool ipV6Only = false
);
See also: Poco::Net::SocketImpl::bind6()
virtual void close();
See also: Poco::Net::SocketImpl::close()
virtual void connect(
const SocketAddress & address
);
See also: Poco::Net::SocketImpl::connect()
virtual void connect(
const SocketAddress & address,
const Poco::Timespan & timeout
);
See also: Poco::Net::SocketImpl::connect()
virtual void connectNB(
const SocketAddress & address
);
See also: Poco::Net::SocketImpl::connectNB()
int frameFlags() const;
Returns the frame flags of the most recently received frame.
virtual Poco::Timespan getReceiveTimeout();
virtual Poco::Timespan getSendTimeout();
See also: Poco::Net::SocketImpl::getSendTimeout()
virtual void listen(
int backlog = 64
);
See also: Poco::Net::SocketImpl::listen()
bool mustMaskPayload() const;
Returns true if the payload must be masked.
virtual int receiveBytes(
void * buffer,
int length,
int flags
);
Receives a WebSocket protocol frame.
See also: Poco::Net::SocketImpl::receiveBytes()
virtual int receiveFrom(
void * buffer,
int length,
SocketAddress & address,
int flags = 0
);
See also: Poco::Net::SocketImpl::receiveFrom()
virtual bool secure() const;
See also: Poco::Net::SocketImpl::secure()
virtual int sendBytes(
const void * buffer,
int length,
int flags
);
Sends a WebSocket protocol frame.
See also: Poco::Net::StreamSocketImpl::sendBytes()
virtual int sendTo(
const void * buffer,
int length,
const SocketAddress & address,
int flags = 0
);
See also: Poco::Net::SocketImpl::sendTo()
virtual void sendUrgent(
unsigned char data
);
See also: Poco::Net::SocketImpl::sendUrgent()
virtual void setReceiveTimeout(
const Poco::Timespan & timeout
);
virtual void setSendTimeout(
const Poco::Timespan & timeout
);
See also: Poco::Net::SocketImpl::setSendTimeout()
virtual void shutdown();
See also: Poco::Net::SocketImpl::shutdown()
virtual void shutdownReceive();
See also: Poco::Net::SocketImpl::shutdownReceive()
virtual void shutdownSend();
See also: Poco::Net::SocketImpl::shutdownSend()
int receiveNBytes(
void * buffer,
int bytes
);