replicode
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TCPChannel Class Reference

#include <tcp_channel.h>

Inheritance diagram for TCPChannel:
Inheritance graph
Collaboration diagram for TCPChannel:
Collaboration graph

Public Member Functions

 TCPChannel (core::socket s)
 
 ~TCPChannel ()
 
int16_t send (uint8_t *b, size_t s)
 
int16_t recv (uint8_t *b, size_t s, bool peek=false)
 
bool isConnected ()
 
bool disconnect ()
 
- Public Member Functions inherited from mBrane::sdk::ConnectedCommChannel
virtual ~ConnectedCommChannel ()
 
- Public Member Functions inherited from mBrane::sdk::CommChannel
virtual ~CommChannel ()
 
int16_t bufferedSend (uint8_t *b, size_t s, bool sendNow=false)
 
int16_t send (_Payload *p, uint8_t destinationNID)
 
int16_t recv (_Payload **p, uint8_t sourceNID)
 

Private Member Functions

bool initialiseBuffer (uint32_t len)
 
bool setBlockingMode (bool blocking)
 

Private Attributes

std::mutex m_mutex
 
uint32_t bufferLen
 
uint32_t bufferPos
 
char * buffer
 
core::socket s
 

Additional Inherited Members

- Protected Member Functions inherited from mBrane::sdk::ConnectedCommChannel
 ConnectedCommChannel ()
 
- Protected Member Functions inherited from mBrane::sdk::CommChannel
 CommChannel ()
 
int16_t _send (__Payload *c, uint8_t destinationNID)
 
int16_t _recv (__Payload **c, uint8_t sourceNID)
 
- Protected Attributes inherited from mBrane::sdk::CommChannel
std::mutex commSendMutex
 
std::mutex commRecvMutex
 
uint8_tsendBuffer
 
uint32_t sendBufferLen
 
uint32_t sendBufferPos
 

Constructor & Destructor Documentation

TCPChannel::TCPChannel ( core::socket  s)

Here is the call graph for this function:

TCPChannel::~TCPChannel ( )

Member Function Documentation

bool TCPChannel::disconnect ( )
virtual

Implements mBrane::sdk::CommChannel.

Here is the caller graph for this function:

bool TCPChannel::initialiseBuffer ( uint32_t  len)
private

Here is the caller graph for this function:

bool TCPChannel::isConnected ( )
virtual

Implements mBrane::sdk::CommChannel.

Here is the call graph for this function:

int16_t TCPChannel::recv ( uint8_t b,
size_t  s,
bool  peek = false 
)
virtual

Implements mBrane::sdk::CommChannel.

Here is the call graph for this function:

Here is the caller graph for this function:

int16_t TCPChannel::send ( uint8_t b,
size_t  s 
)
virtual

Implements mBrane::sdk::CommChannel.

Here is the call graph for this function:

bool TCPChannel::setBlockingMode ( bool  blocking)
private

Here is the caller graph for this function:

Member Data Documentation

char* TCPChannel::buffer
private
uint32_t TCPChannel::bufferLen
private
uint32_t TCPChannel::bufferPos
private
std::mutex TCPChannel::m_mutex
private
core::socket TCPChannel::s
private

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