25 void bind(u_int16_t port_begin, u_int16_t port_fence);
26 int port() {
return port_; }
29 bool initialized() {
return initialized_; }
30 bool bound() {
return bound_; }
37 int read(
void *d,
int n);
38 int write(
const void *d,
int n);
39 int read_int(
int *d,
int n) {
return read((
void*)d,n*
sizeof(
int));}
40 int write_int(
const int *d,
int n) {
return write((
void*)d,n*
sizeof(
int));}
41 int read_string(std::string &);
42 int write_string(
const std::string &);
45 int read_uint32(u_int32_t &);
46 int write_uint32(u_int32_t);
52 void listen(
int queue_length = 8);
65 bool connected() {
return connected_; }
66 void connect(
const char *remote_hostname, u_int16_t remote_port);
67 void connect(u_int32_t remote_host, u_int16_t remote_port);