Inheritance diagram for DatagramSocket:
Public Member Functions | |
this () | |
int | read (IBuffer target, Address addr) |
int | read (IBuffer target) |
int | write (IBuffer source, Address to) |
Private Member Functions | |
this (socket_t sock) | |
this (AddressFamily af, Type type, Protocol protocol) | |
void | set (socket_t sock) |
void | reset () |
void | create (AddressFamily af, Type type, Protocol protocol) |
socket_t | handle () |
char[] | toString () |
bit | blocking () |
void | blocking (bit byes) |
AddressFamily | addressFamily () |
bit | isAlive () |
void | bind (Address addr) |
void | connect (Address to) |
void | listen (int backlog) |
Socket | createSocket (socket_t handle) |
Socket | accept () |
void | shutdown () |
void | shutdown (Shutdown how) |
void | setLingerPeriod (int period) |
void | setAddressReuse (bool enabled) |
bool | setGroup (InternetAddress address, Option option) |
void | closure () |
bit | poll (events) |
Static Private Member Functions | |
static bool | isCancelled () |
static void | cancelAll (bool cancel) |
static int | select (SocketSet checkRead, SocketSet checkWrite, SocketSet checkError, timeval *tv) |
static int | select (SocketSet checkRead, SocketSet checkWrite, SocketSet checkError, int microseconds) |
static int | select (SocketSet checkRead, SocketSet checkWrite, SocketSet checkError) |
Note that when used with a SocketListener you must first bind the DatagramSocket to a local adapter. This can be done by binding it to an InternetAddress constructed with a port only (ADDR_ANY).
Definition at line 58 of file DatagramSocket.d.
|
Create an internet datagram socket Reimplemented from Resource. Definition at line 66 of file DatagramSocket.d. |
|
Read the available bytes from datagram into the given IBuffer. The 'from' address will be populated appropriately Definition at line 78 of file DatagramSocket.d. References assert(). Referenced by read(). |
|
Read the available bytes from datagram into the given IBuffer. The 'from' address will be populated appropriately Reimplemented from ISocketReader. Definition at line 100 of file DatagramSocket.d. References read(). |
|
Write content from the specified buffer to the given address. Definition at line 113 of file DatagramSocket.d. References assert(). Referenced by Cluster::broadcast(), and testMulticast(). |
|
Construct a Socket from a handle. This is used internally to create new Sockets via an accept(). Reimplemented in SocketConduit. Definition at line 505 of file Socket.d. References Socket::set(). |
|
Definition at line 869 of file Socket.d. References Resource::acquire(), and Socket::create(). |
|
MANGO: moved this out from the above constructor so that it can be called from the FreeList version of SocketConduit Definition at line 518 of file Socket.d. References Resource::acquire(). Referenced by SocketConduit::VersionUseFreeList::allocate(), and Socket::this(). |
|
MANGO: added to reset socket Definition at line 532 of file Socket.d. References INVALID_SOCKET. Referenced by SocketConduit::VersionUseFreeList::deallocate(). |
|
MANGO: added for subscriber control Definition at line 546 of file Socket.d. References Socket::cancelled. |
|
MANGO: added for subscriber control Definition at line 557 of file Socket.d. References Socket::cancelled, printf(), and version. |
|
MANGO: added for multicast support Definition at line 884 of file Socket.d. References Socket::_family, and Socket::sock. Referenced by ServerSocket::createSocket(), MulticastSocket::leave(), and Socket::this(). |
|
get underlying socket handle Definition at line 899 of file Socket.d. References Socket::sock. Referenced by Socket::blocking(), and Socket::setGroup(). |
|
|
|
getter Definition at line 922 of file Socket.d. References Socket::_blocking, Socket::handle(), and version. Referenced by Socket::connect(). |
|
setter Definition at line 941 of file Socket.d. References Socket::_blocking, Socket::handle(), Socket::sock, SOCKET_ERROR, version, and x. |
|
Definition at line 972 of file Socket.d. References Socket::_family. |
|
Definition at line 983 of file Socket.d. References Socket::sock, and SOCKET_ERROR. |
|
Definition at line 995 of file Socket.d. References Address::name(), Address::nameLen(), Socket::sock, and SOCKET_ERROR. Referenced by MulticastSocket::join(), and ServerSocket::this(). |
|
Definition at line 1007 of file Socket.d. References assert(), Socket::blocking(), Address::name(), Address::nameLen(), Socket::sock, SOCKET_ERROR, and version. Referenced by HttpClient::open(), SocketAppender::setAddress(), testClient(), testClusterServer(), testHttpClient(), testHttpClient2(), and testSocket(). |
|
need to bind() first Definition at line 1039 of file Socket.d. References Socket::sock, and SOCKET_ERROR. Referenced by ServerSocket::this(). |
|
MANGO: added Reimplemented in ServerSocket. Definition at line 1051 of file Socket.d. References Socket. Referenced by Socket::accept(). |
|
Reimplemented in ServerSocket. Definition at line 1061 of file Socket.d. References Socket::_blocking, Socket::_family, Socket::createSocket(), INVALID_SOCKET, Socket::sock, and version. Referenced by ServerSocket::accept(). |
|
Definition at line 1087 of file Socket.d. References Socket::sock. Referenced by HttpClient::close(), and Socket::shutdown(). |
|
Definition at line 1097 of file Socket.d. References Socket::shutdown(), and Socket::sock. |
|
MANGO: added Reimplemented in ServerSocket. Definition at line 1109 of file Socket.d. References Socket::setOption(). Referenced by ServerSocket::createSocket(). |
|
MANGO: added Definition at line 1127 of file Socket.d. References Socket::setOption(), and x. Referenced by MulticastSocket::join(), and ServerSocket::this(). |
|
Helper function to handle the adding and dropping of group membership. MANGO: Added Definition at line 1143 of file Socket.d. References Socket::handle(), InternetAddress::sin, and SOCKET_ERROR. |
|
calling shutdown() before this is recommended for connection- oriented sockets MANGO: changed from close() to IResource.closure() Reimplemented from Resource. Definition at line 1168 of file Socket.d. References printf(), Socket::sock, and version. Referenced by MulticastSocket::leave(). |
|
SocketSet's are updated to include only those sockets which an event occured. Returns the number of events, 0 on timeout, or -1 on interruption for a connect()ing socket, writeability means connected for a listen()ing socket, readability means listening Winsock: possibly internally limited to 64 sockets per set Definition at line 1473 of file Socket.d. References assert(). Referenced by Socket::poll(), and SocketConduit::read(). |
|
|
|
maximum timeout |
|
Definition at line 1553 of file Socket.d. References Socket::select(). |