BMAStreamSocket Class Reference
Inheritance diagram for BMAStreamSocket:
[legend]
Collaboration diagram for BMAStreamSocket:
[legend]

## Public Member Functions

| BMAStreamSocket (BMAEPoll &ePoll)
int | writeFrame (BMAStreamFrame *frame)
Public Member Functions inherited from BMASession
| BMASession (BMAEPoll &ePoll)
virtual void | output (stringstream &out)
Public Member Functions inherited from BMATCPSocket
| BMATCPSocket (BMAEPoll &ePoll)
string | getClientAddress ()
| Get the client network address as xxx.xxx.xxx.xxx.
string | getClientAddressAndPort ()
| Get the client network address and port as xxx.xxx.xxx.xxx:ppppp.
int | getClientPort ()
| Get the client network port number.
void | onConnected () override
| Called when socket is open and ready to communicate. More...
Public Member Functions inherited from BMASocket
| BMASocket (BMAEPoll &ePoll)
| ~BMASocket ()
void | setDescriptor (int descriptor)
| Set the descriptor for the socket.
int | getDescriptor ()
| Get the descriptor for the socket.
void | eventReceived (struct epoll_event event)
| Parse epoll event and call specified callbacks. More...
void | write (char *buffer, int length)
void | output (stringstream &out)
virtual void | onRegistered ()
| Called when the socket has finished registering with the epoll processing. More...

## Protected Member Functions

void | onDataReceived (char *data, int length)
| Called when data is received from the socket. More...
void | onStreamDataReceived (BMAStreamFrame *frame)
Protected Member Functions inherited from BMASession
virtual void | onConnected ()
| Called when socket is open and ready to communicate. More...
virtual void | protocol (char *data, int length)
Protected Member Functions inherited from BMASocket
void | setBufferSize (int length)

## Additional Inherited Members

Public Attributes inherited from BMASession
string | command
Public Attributes inherited from BMATCPSocket
struct sockaddr_in | client_addr
socklen_t | client_addr_len
Public Attributes inherited from BMASocket
class {
} | bufferSize
Public Attributes inherited from BMAObject
string | name
string | tag
Protected Attributes inherited from BMASocket
BMAEPoll & | ePoll
bool | shutDown = false

## Member Function Documentation

## onDataReceived()

void BMAStreamSocket::onDataReceived | ( | char * | data,
|  | int | length
| ) |  |

protectedvirtual

Called when data is received from the socket.

The onDataReceived method is called when the socket has received an event from epoll and there is data ready to be read from the socket. The default handler will pull the data and put it into the streambuf for the socket. EPOLLIN

Reimplemented from BMASession.

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

- /home/barant/Documents/Development/BMASockets/BMAStreamSocket.h
- /home/barant/Documents/Development/BMASockets/BMAStreamSocket.cpp