Rudiments
|
Inherits securitycontext.
Public Member Functions | |
websocket () | |
virtual | ~websocket () |
void | setFileDescriptor (filedescriptor *fd) |
filedescriptor * | getFileDescriptor () |
bool | connect () |
bool | accept () |
ssize_t | read (void *buf, ssize_t size) |
ssize_t | write (const void *buf, ssize_t size) |
bool | ping (const unsigned char *buf, ssize_t size) |
ssize_t | pending () |
bool | close () |
ssize_t | getSizeMax () |
websocket::websocket | ( | ) |
Creates a new instance of the websocket class.
|
virtual |
Deletes this instance of the websocket class.
|
virtual |
Accepts a security context from the client with whom a connection is already established across the filedescriptor previously set using setFileDescriptor().
Note that if this instance is set as the current GSS context of a child of the socketserver class, then this method is called implicitly during a successful call to accept().
Returns true on success and false on failure.
Implements securitycontext.
|
virtual |
Releases any security context established during the previous call to connect() or accept().
Implements securitycontext.
|
virtual |
Initiates a security context with the server with whom a connection is already established across the filedescriptor previously set using setFileDescriptor().
Note that if this instance is set as the current security context of a child of the socketclient class, then this method is called implicitly during a successful call to connect().
Returns true on success and false on failure.
Implements securitycontext.
|
virtual |
Returns the file descrptor that will be used to communicate with the peer during the next call to connect() or accept().
Implements securitycontext.
|
virtual |
Returns the maximum number of bytes that can be written or read in a single call to write() or read().
Implements securitycontext.
|
virtual |
Returns the number of bytes that are buffered and available for immediate read.
Implements securitycontext.
bool websocket::ping | ( | const unsigned char * | buf, |
ssize_t | size | ||
) |
Pings the peer with "size" bytes of "buf" data. Returns true if the peer responds with the same data or false if the peer doesn't respond or responds with different data.
|
virtual |
Reads from the file descriptor previously configured by setFileDescriptor() into "buf" until "size" bytes have been read. Returns the number of bytes that were written to "buf" or RESULT_ERROR if an error occurred.
Implements securitycontext.
|
virtual |
Sets the file descriptor that will be used to communicate with the peer during the next call to connect() or accept().
Implements securitycontext.
|
virtual |
Writes "size" bytes from "buf" to the file descriptor previously configured by setFileDescriptor(). Returns the number of bytes that were written or RESULT_ERROR if an error occurred.
Implements securitycontext.