Base class for multi threaded transferring simulation between a server and a client using sockets.
More...
#include <CoSimulationBase.h>
Base class for multi threaded transferring simulation between a server and a client using sockets.
Definition at line 34 of file CoSimulationBase.h.
◆ CoSimulationBase()
| agxNet::CoSimulationBase::CoSimulationBase |
( |
| ) |
|
◆ ~CoSimulationBase()
| virtual agxNet::CoSimulationBase::~CoSimulationBase |
( |
| ) |
|
|
protectedvirtual |
◆ dropConnection()
| virtual void agxNet::CoSimulationBase::dropConnection |
( |
bool |
shouldShutdown = false | ) |
|
|
virtual |
Drop the connection to the remote host and wait for a new one.
- Parameters
-
| shouldShutdown | - Can be used by derived classes to shutdown the communication. |
Reimplemented in agxNet::CoSimulationServer.
◆ handleConnectionDrop()
| virtual void agxNet::CoSimulationBase::handleConnectionDrop |
( |
| ) |
|
|
protectedvirtual |
◆ isConnected()
| virtual bool agxNet::CoSimulationBase::isConnected |
( |
| ) |
|
|
virtual |
- Returns
- true if we are connected to a remote party
◆ receiveData()
| size_t agxNet::CoSimulationBase::receiveData |
( |
uint8_t * |
data, |
|
|
size_t |
numBytes |
|
) |
| |
|
protected |
Receive data from remote party.
- Parameters
-
| data | - pointer to address where data will be written |
| numBytes | - size of memory storage. |
- Returns
- number of bytes read.
◆ receivePacket()
| void agxNet::CoSimulationBase::receivePacket |
( |
Header & |
header | ) |
|
|
protected |
◆ sendData()
| size_t agxNet::CoSimulationBase::sendData |
( |
const uint8_t * |
data, |
|
|
size_t |
numBytes |
|
) |
| |
|
protected |
Transmit data to remote party.
Data block can be chopped up into smaller chunks.
- Parameters
-
| data | - bit stream that should be transmitted to remote client |
| numBytes | - number of bytes to be transmitted. |
- Returns
- number of bytes sent
◆ sendPacket()
| void agxNet::CoSimulationBase::sendPacket |
( |
Header & |
header | ) |
|
|
protected |
◆ waitForConnection()
| virtual bool agxNet::CoSimulationBase::waitForConnection |
( |
| ) |
|
|
pure virtual |
◆ m_buffer
◆ m_connectionMutex
| agx::Mutex agxNet::CoSimulationBase::m_connectionMutex |
|
protected |
◆ m_isShutdown
| bool agxNet::CoSimulationBase::m_isShutdown |
|
protected |
◆ m_socket
The documentation for this class was generated from the following file: