utilmm::socket Class Reference
[OS-related tools]
#include <socket.hh>
List of all members.
Public Member Functions |
void | connect (std::string const &to) |
void | connect (std::string const &to) |
int | read (void *buf, size_t size) const |
int | read (void *buf, size_t size) const |
| socket (Domain domain, Type type, std::string const &connect_to) |
| socket (int fd) |
| socket (Domain domain, Type type, std::string const &connect_to) |
| socket (int fd) |
int | write (void const *buf, size_t size) const |
int | write (void const *buf, size_t size) const |
Friends |
class | server_socket |
Detailed Description
A socket connected to a remote peer
Definition at line 69 of file install/include/utilmm/system/socket.hh.
Constructor & Destructor Documentation
utilmm::socket::socket |
( |
int |
fd |
) |
|
Creates a socket object from an already existing file descriptor
Definition at line 167 of file socket.cc.
utilmm::socket::socket |
( |
Domain |
domain, |
|
|
Type |
type, |
|
|
std::string const & |
connect_to | |
|
) |
| | |
Opens a new socket in the specified domain and of the specified type, and connect it to connect_to
. connect_to
is either an IP address of the form a.b.c.d
:port if domain
is Inet, or a Unix socket name otherwise.
Definition at line 164 of file socket.cc.
utilmm::socket::socket |
( |
int |
fd |
) |
|
Creates a socket object from an already existing file descriptor
utilmm::socket::socket |
( |
Domain |
domain, |
|
|
Type |
type, |
|
|
std::string const & |
connect_to | |
|
) |
| | |
Opens a new socket in the specified domain and of the specified type, and connect it to connect_to
. connect_to
is either an IP address of the form a.b.c.d
:port if domain
is Inet, or a Unix socket name otherwise.
Member Function Documentation
void utilmm::socket::connect |
( |
std::string const & |
to |
) |
|
Connects or reconnects this socket to the specified peer. to
is either an IP address of the form a.b.c.d
:port if domain
is Inet, or a Unix socket name otherwise.
void utilmm::socket::connect |
( |
std::string const & |
to |
) |
|
Connects or reconnects this socket to the specified peer. to
is either an IP address of the form a.b.c.d
:port if domain
is Inet, or a Unix socket name otherwise.
Definition at line 170 of file socket.cc.
int utilmm::socket::read |
( |
void * |
buf, |
|
|
size_t |
size | |
|
) |
| | const |
Reads at most size
bytes in the specified buffer and returns the count of bytes actually read.
- Exceptions:
-
int utilmm::socket::read |
( |
void * |
buf, |
|
|
size_t |
size | |
|
) |
| | const |
Reads at most size
bytes in the specified buffer and returns the count of bytes actually read.
- Exceptions:
-
Definition at line 176 of file socket.cc.
int utilmm::socket::write |
( |
void const * |
buf, |
|
|
size_t |
size | |
|
) |
| | const |
Writes at most size
bytes in the specified buffer and returns the count of bytes actually written.
- Exceptions:
-
int utilmm::socket::write |
( |
void const * |
buf, |
|
|
size_t |
size | |
|
) |
| | const |
Writes at most size
bytes in the specified buffer and returns the count of bytes actually written.
- Exceptions:
-
Definition at line 183 of file socket.cc.
Friends And Related Function Documentation
The documentation for this class was generated from the following files: