This class will be expanded to include socket-specific I/O methods.
|
Public Types |
enum | flags { none = 0,
nonblocking = 1,
acceptor = 2
} |
Public Methods |
| socket () |
| Null constructor.
|
| socket (const iohandle &ioh) |
| Constructs a socket from a given iohandle.
|
status | stat () |
| Updates the socket error state if there's no current error (useful after a connect).
|
address | getpeername () |
| Returns the peer name of the socket, if any.
|
address | getsockname () |
| Returns the local name of the socket, if any.
|
status | bind (const address &a) |
| Attempts to bind the socket.
|
status | connect (const address &a) |
| Attempts to connect the socket.
|
status | listen (int backlog=5) |
| Listens on the socket.
|
socket | accept (address &a) |
| Attempts to accept a connection on the socket.
|
Static Public Methods |
int | sys_socket (int a, int b, int c) |
Protected Methods |
| socket (int fd) |
| socket (int family, int type) |
| socket (int family, int type, address addr, flags f=none) |