|
enum | { OPTION_DONT_ROUTE,
OPTION_TCP_NO_DELAY,
OPTION_TCP_DEFER_ACCEPT
} |
|
enum | Domain { IPV4,
IPV6,
DEFAULT_DOMAIN = IPV4
} |
|
enum | Kind { STREAM,
DATAGRAM,
RAW
} |
|
OperatingSystem::Handle | getHandle () const noexcept |
|
bool | getBooleanOption (int option) const |
|
void | setBooleanOption (int option, bool value) |
|
| Socket () noexcept |
|
Domain | getDomain () const |
|
Kind | getKind () const |
|
bool | accept (Socket &socket) |
|
void | bind (const InetAddress &address, unsigned short port) |
|
void | bind (const InetEndPoint &endPoint) |
|
void | close () |
|
void | connect (const InetAddress &address, unsigned short port) |
|
void | connect (const InetEndPoint &endPoint) |
|
void | create (Kind kind, Domain domain=DEFAULT_DOMAIN) |
|
void | getName () noexcept |
|
const InetAddress & | getAddress () const noexcept |
|
unsigned short | getPort () const noexcept |
|
InetEndPoint | getEndPoint () const noexcept |
|
const InetAddress & | getLocalAddress () const noexcept |
|
unsigned short | getLocalPort () const noexcept |
|
InetEndPoint | getLocalEndPoint () const noexcept |
|
void | listen (unsigned int backlog) |
|
void | shutdownInputStream () |
|
void | shutdownOutputStream () |
|
int | getErrorState () const |
|
bool | getReuseAddress () const |
|
void | setReuseAddress (bool value) |
|
bool | getKeepAlive () const |
|
void | setKeepAlive (bool value) |
|
bool | getBroadcast () const |
|
void | setBroadcast (bool value) |
|
int | getLinger () const |
|
void | setLinger (int seconds) |
|
int | getReceiveBufferSize () const |
|
void | setReceiveBufferSize (int size) |
|
int | getSendBufferSize () const |
|
void | setSendBufferSize (int size) |
|
bool | getDontRoute () const |
|
void | setDontRoute (bool value) |
|
uint64 | getReceiveTimeout () const |
|
void | setReceiveTimeout (uint64 nanoseconds) |
|
uint64 | getSendTimeout () const |
|
void | setSendTimeout (uint64 nanoseconds) |
|
bool | getTcpNoDelay () const |
|
void | setTcpNoDelay (bool value) |
|
uint64 | getTcpDeferAccept () const |
|
void | setTcpDeferAccept (uint64 nanoseconds) |
|
unsigned int | getTimeToLive () const |
|
void | setTimeToLive (unsigned int value) |
|
uint8 | getMulticastHops () const |
|
void | setMulticastHops (uint8 value) |
|
bool | getMulticastLoopback () const |
|
void | setMulticastLoopback (bool value) |
|
InetAddress | getMulticastInterface () const |
|
void | setMulticastInterface (const InetAddress &interface) |
|
uint8 | getUnicastHops () const |
|
void | setUnicastHops (uint8 value) |
|
void | joinGroup (const InetAddress &group) |
|
void | joinGroup (const InetAddress &interface, const InetAddress &group) |
|
void | leaveGroup (const InetAddress &interface, const InetAddress &group) |
|
bool | getIPv6Restriction () const |
|
void | setIPv6Restriction (bool value) |
|
void | setNonBlocking (bool value) |
|
unsigned int | available () const |
|
void | flush () |
|
unsigned int | read (uint8 *buffer, unsigned int size, bool nonblocking=false) |
|
unsigned int | write (const uint8 *buffer, unsigned int size, bool nonblocking=false) |
|
unsigned int | sendTo (const uint8 *buffer, unsigned int size, const InetAddress &address, unsigned short port) |
|
unsigned int | receiveFrom (uint8 *buffer, unsigned int size, InetAddress &address, unsigned short &port) |
|
void | asyncCancel () |
|
AsynchronousReadOperation | read (uint8 *buffer, unsigned int bytesToRead, AsynchronousReadEventListener *listener) |
|
AsynchronousWriteOperation | write (const uint8 *buffer, unsigned int bytesToWrite, AsynchronousWriteEventListener *listener) |
|
void | wait () const |
|
bool | wait (unsigned int microseconds) const |
|
| ~Socket () |
|
String | getDescription () const |
|
void | setDescription (const String &description) |
|
unsigned int | getResourceId () const |
|
unsigned int | getCreatedById () const |
|
AnyReference | getHandle () const noexcept |
|
template<class TYPE > |
TYPE & | getInternalHandle () const |
|
| operator bool () const noexcept |
|
virtual | ~AsynchronousStream () noexcept(false) |
|
static const char * | toString (Domain domain) noexcept |
|
static const char * | toString (Kind kind) noexcept |
|
static bool | asyncTest () noexcept |
|
AnyReference | handle |
|
Server socket.
This class implements a stream server socket. A socket is an endpoint for communication between two hosts.
- Version
- 1.0
- Examples
- testsuite/echod.cpp, testsuite/ftp.cpp, and testsuite/server.cpp.