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) |