|
enum | status { unlink,
link,
linkRemoteClose,
error
} |
|
|
| Tcp (int32_t _idSocket, const std::string &_name) |
|
| Tcp (Tcp &&_obj) |
|
Tcp & | operator= (Tcp &&_obj) |
|
Tcp & | operator= (Tcp &_obj)=delete |
|
const std::string & | getName () |
|
enum status | getConnectionStatus () const |
|
bool | unlink () |
|
int32_t | read (void *_data, int32_t _maxLen) |
|
int32_t | write (const void *_data, int32_t _len) |
|
int32_t | write (const std::string &_data, bool _writeBackSlashZero=true) |
|
template<class T > |
int32_t | write (const std::vector< T > &_data) |
|
bool | setTCPNoDelay (bool _enabled) |
|
§ getConnectionStatus()
enum status enet::Tcp::getConnectionStatus |
( |
| ) |
const |
|
inline |
Get the current Status of the connection.
- Returns
- The status.
§ getName()
const std::string& enet::Tcp::getName |
( |
| ) |
|
|
inline |
Get the decriptive name hot the host:port.
- Returns
- the string requested
§ read()
int32_t enet::Tcp::read |
( |
void * |
_data, |
|
|
int32_t |
_maxLen |
|
) |
| |
Read a chunk of data on the socket.
- Parameters
-
[in] | _data | pointer on the data might be write |
[in] | _maxLen | Size that can be written on the pointer |
- Returns
- >0 byte size on the socket read
-
-1 an error occured.
§ unlink()
bool enet::Tcp::unlink |
( |
| ) |
|
Unlink on a specific interface.
- Returns
- true if connection is removed
-
false otherwise ...
§ write() [1/3]
int32_t enet::Tcp::write |
( |
const void * |
_data, |
|
|
int32_t |
_len |
|
) |
| |
Write a chunk of data on the socket.
- Parameters
-
[in] | _data | pointer on the data might be write |
[in] | _len | Size that must be written socket |
- Returns
- >0 byte size on the socket write
-
-1 an error occured.
§ write() [2/3]
int32_t enet::Tcp::write |
( |
const std::string & |
_data, |
|
|
bool |
_writeBackSlashZero = true |
|
) |
| |
|
inline |
Write a chunk of data on the socket.
- Parameters
-
[in] | _data | String to rite on the soccket |
[in] | _writeBackSlashZero | if false, the \0 is not write |
- Returns
- >0 byte size on the socket write
-
-1 an error occured.
§ write() [3/3]
template<class T >
int32_t enet::Tcp::write |
( |
const std::vector< T > & |
_data | ) |
|
|
inline |
Write a chunk of data on the socket.
- Parameters
-
[in] | _data | String to rite on the soccket |
[in] | _writeBackSlashZero | if false, the \0 is not write |
- Returns
- >0 T element write on the socket
-
-1 an error occured.
The documentation for this class was generated from the following file:
- framework/atria-soft/enet/enet/Tcp.hpp