Tuple of socket Receiver and Transmitter for the Server.
More...
#include <TcpServer.h>
Tuple of socket Receiver and Transmitter for the Server.
- Copyright
- © 2010 Helmut Jakoby
- Author
- Helmut Jakoby
◆ ServerReceiverTransmitter() [1/3]
tcp::Server::ServerReceiverTransmitter::ServerReceiverTransmitter |
( |
| ) |
|
|
protected |
This constructor is not available.
◆ ServerReceiverTransmitter() [2/3]
This constructor starts the passed tcp Receiver and Transmitter.
- Parameters
-
- Attention
- ServerReceiverTransmitter assumes responsibility for the objects transferred in pTransmitter and pReceiver. This means that the calling instance must not remove the passed objects from memory!
- Exceptions
-
◆ ~ServerReceiverTransmitter()
virtual tcp::Server::ServerReceiverTransmitter::~ServerReceiverTransmitter |
( |
| ) |
|
|
virtual |
◆ ServerReceiverTransmitter() [3/3]
The copy constructor is not available.
◆ getPeerName()
int tcp::Server::ServerReceiverTransmitter::getPeerName |
( |
std::string & | rstrIPAdress, |
|
|
unsigned int & | ruiPort ) const |
Returns the IP address and the port.
- Parameters
-
[in,out] | rstrIPAdress | The IP address (e.g. "LOCALHOST" or "192.168.2.102"). |
[in,out] | ruiPort | The port which is addressed. |
- Returns
- A return value < 0 indicates an error.
◆ operator=()
The assignment operator is not available.
◆ send() [1/2]
int tcp::Server::ServerReceiverTransmitter::send |
( |
char * | pszRawMsg, |
|
|
unsigned int | uiRawMsgSize, |
|
|
unsigned int | uiMessageID = 0, |
|
|
int | iActionCode = 0, |
|
|
const std::string & | rstrInfo = "" ) |
Sends transferred data to the client via its Transmitter.
- Parameters
-
[in] | pszRawMsg | Pointer to the data to be sent. |
[in] | uiRawMsgSize | The size of the data to be sent. |
[in] | uiMessageID | A MessageID can be passed. |
[in] | iActionCode | A ActionCode can be passed. |
[in] | rstrInfo | A free info can be passed. |
- Returns
- A return value < 0 indicates an error.
- Attention
- The data in pszRawMsg is internally removed from memory; the calling instance may no longer use the data to be sent or remove it from memory.
◆ send() [2/2]
int tcp::Server::ServerReceiverTransmitter::send |
( |
Message * | pTcpMessage | ) |
|
Sends passed Message to the client via its Transmitter.
- Parameters
-
[in] | pTcpMessage | The message packet to be sent. |
- Returns
- A return < 0 indicates an error.
- Attention
- The passed Message must not be removed from memory by the calling instance! Since the Message is passed to the Transmitter for further processing, and the Transmitter decides when to send, the Transmitter must also remove the Message from memory.
◆ setValid()
void tcp::Server::ServerReceiverTransmitter::setValid |
( |
bool | bValid | ) |
|
Is called if socket is no longer ok.
◆ Socket()
SOCKET tcp::Server::ServerReceiverTransmitter::Socket |
( |
| ) |
const |
Returns the socket.
- Exceptions
-
◆ m_pReceiver
◆ m_pTransmitter
Transmitter* tcp::Server::ServerReceiverTransmitter::m_pTransmitter |
|
private |
The documentation for this class was generated from the following file: