provides a basic TCP server for line by line text based communications to a one or more remote TCP clients
More...
#include <goby/util/linebasedcomms/tcp_server.h>
|
typedef std::string | Endpoint |
|
enum | AccessOrder { NEWEST_FIRST,
OLDEST_FIRST
} |
|
|
| TCPServer (unsigned port, const std::string &delimiter="\r\n") |
| create a TCP server More...
|
|
void | close (const Endpoint &endpoint) |
|
std::string | local_endpoint () |
| string representation of the local endpoint (e.g. 192.168.1.105:54230
|
|
const std::map< Endpoint, boost::shared_ptr< TCPConnection > > & | connections () |
|
| LineBasedInterface (const std::string &delimiter) |
|
void | start () |
|
void | close () |
|
bool | active () |
|
void | sleep (int sec) |
|
bool | readline (std::string *s, AccessOrder order=OLDEST_FIRST) |
| returns string line (including delimiter) More...
|
|
bool | readline (protobuf::Datagram *msg, AccessOrder order=OLDEST_FIRST) |
|
void | write (const std::string &s) |
|
void | write (const protobuf::Datagram &msg) |
|
void | clear () |
|
void | set_delimiter (const std::string &s) |
|
std::string | delimiter () const |
|
boost::asio::io_service & | io_service () |
|
|
class | TCPConnection |
|
class | LineBasedConnection< boost::asio::ip::tcp::socket > |
|
provides a basic TCP server for line by line text based communications to a one or more remote TCP clients
Definition at line 49 of file tcp_server.h.
goby::util::TCPServer::TCPServer |
( |
unsigned |
port, |
|
|
const std::string & |
delimiter = "\r\n" |
|
) |
| |
|
inline |
create a TCP server
- Parameters
-
port | port of the server (use 50000+ to avoid problems with special system ports) |
delimiter | string used to split lines |
Definition at line 56 of file tcp_server.h.
The documentation for this class was generated from the following files: