ofxHTTP
A collection of tools for HTTP.
ofx::HTTP::WebSocketFrame Class Reference

A WebSocketFrame frame. More...

#include <WebSocketFrame.h>

Inheritance diagram for ofx::HTTP::WebSocketFrame:

Public Member Functions

 WebSocketFrame (int flags=Poco::Net::WebSocket::FRAME_TEXT)
 Create a WebSocketFrame.
 
 WebSocketFrame (const IO::ByteBuffer &buffer, int flags=Poco::Net::WebSocket::FRAME_TEXT)
 Create a WebSocketFrame.
 
 WebSocketFrame (const ofBuffer &buffer, int flags=Poco::Net::WebSocket::FRAME_TEXT)
 Create a WebSocketFrame.
 
 WebSocketFrame (const std::string &text, int flags=Poco::Net::WebSocket::FRAME_TEXT)
 Create a WebSocketFrame.
 
 WebSocketFrame (const char *buffer, std::size_t size, int flags=Poco::Net::WebSocket::FRAME_TEXT)
 Create a WebSocketFrame.
 
 WebSocketFrame (const unsigned char *buffer, std::size_t size, int flags=Poco::Net::WebSocket::FRAME_TEXT)
 Create a WebSocketFrame.
 
virtual ~WebSocketFrame ()
 Destroy a WebSocketFrame.
 
int flags () const
 
bool isContinuation () const
 
bool isText () const
 
bool isBinary () const
 
bool isClose () const
 
bool isPing () const
 
bool isPong () const
 
bool isFinal () const
 
void setFinal (bool value)
 Set the FIN bit. More...
 
bool isRSV1 () const
 
void setRSV1 (bool value)
 Set the RSV1 bit. More...
 
bool isRSV2 () const
 
void setRSV2 (bool value)
 Set the RSV2 bit. More...
 
bool isRSV3 () const
 
void setRSV3 (bool value)
 Set the RSV3 bit. More...
 
std::string toString () const
 

Protected Attributes

int _flags
 the websocket flags for this frame.
 

Detailed Description

A WebSocketFrame frame.

Member Function Documentation

◆ flags()

int ofx::HTTP::WebSocketFrame::flags ( ) const
Returns
the WebSocketFrame flags.

◆ isBinary()

bool ofx::HTTP::WebSocketFrame::isBinary ( ) const
Returns
true iff a binary frame.

◆ isClose()

bool ofx::HTTP::WebSocketFrame::isClose ( ) const
Returns
true iff a close frame.

◆ isContinuation()

bool ofx::HTTP::WebSocketFrame::isContinuation ( ) const
Returns
true iff a continuation frame.

◆ isFinal()

bool ofx::HTTP::WebSocketFrame::isFinal ( ) const
Returns
true iff a final frame.

◆ isPing()

bool ofx::HTTP::WebSocketFrame::isPing ( ) const
Returns
true iff a ping frame.

◆ isPong()

bool ofx::HTTP::WebSocketFrame::isPong ( ) const
Returns
true iff a pong frame.

◆ isRSV1()

bool ofx::HTTP::WebSocketFrame::isRSV1 ( ) const
Returns
true iff a RSV1 frame.

◆ isRSV2()

bool ofx::HTTP::WebSocketFrame::isRSV2 ( ) const
Returns
true iff a RSV2 frame.

◆ isRSV3()

bool ofx::HTTP::WebSocketFrame::isRSV3 ( ) const
Returns
true iff a RSV3 frame.

◆ isText()

bool ofx::HTTP::WebSocketFrame::isText ( ) const
Returns
true iff a text frame.

◆ setFinal()

void ofx::HTTP::WebSocketFrame::setFinal ( bool  value)

Set the FIN bit.

Parameters
valueThe bit's value.

◆ setRSV1()

void ofx::HTTP::WebSocketFrame::setRSV1 ( bool  value)

Set the RSV1 bit.

Parameters
valueThe bit's value.

◆ setRSV2()

void ofx::HTTP::WebSocketFrame::setRSV2 ( bool  value)

Set the RSV2 bit.

Parameters
valueThe bit's value.

◆ setRSV3()

void ofx::HTTP::WebSocketFrame::setRSV3 ( bool  value)

Set the RSV3 bit.

Parameters
valueThe bit's value.

◆ toString()

std::string ofx::HTTP::WebSocketFrame::toString ( ) const
Returns
a string representing the WebSocketFrame.

The documentation for this class was generated from the following files: