ClickSocketReader (ClickSocket& cs)
| ClickSocketReader |
~ClickSocketReader ()
| ~ClickSocketReader |
[virtual]
int receive_kernel_click_data (ClickSocket& cs, uint32_t seqno,
string& error_msg)
| receive_kernel_click_data |
Force the reader to receive kernel-level Click data from the specified Click socket.
Parameters:
cs | the Click socket to receive the data from. |
seqno | the sequence number of the data to receive. |
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int receive_user_click_data (ClickSocket& cs, uint32_t seqno,
string& error_msg)
| receive_user_click_data |
Force the reader to receive user-level Click data from the specified Click socket.
Parameters:
cs | the Click socket to receive the data from. |
seqno | the sequence number of the data to receive. |
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
const string& buffer_str ()
| buffer_str |
[const]
Return the buffer as a string with the data that was received.
Returns: a C-style string with the data that was received.
void clsock_data (const uint8_t* data, size_t nbytes)
| clsock_data |
[virtual]
Receive data from the Click socket.
Note that this method is called asynchronously when the Click socket has data to receive, therefore it should never be called directly by anything else except the Click socket facility itself.
Parameters:
data | the buffer with the received data. |
nbytes | the number of bytes in the data buffer. |
Reimplemented from ClickSocketObserver.