Create a blocking socket. If a single protocol type exists to support this socket type within the address family, the ProtocolType may be omitted.
Create a blocking socket using the parameters from the specified AddressInfo structure.
Use an existing socket handle.
A destructor is present on this object, but not explicitly documented in the source.
Accept an incoming connection. If the socket is blocking, accept waits for a connection request. Throws SocketAcceptException if unable to accept. See accepting for use with derived classes.
Called by accept when a new Socket must be created for a new connection. To use a derived class, override this method and return an instance of your class. The returned Socket's handle must not be set; Socket has a protected constructor this() to use in this situation.
Associate a local address with this socket.
Immediately drop any connections and release socket resources. The Socket object is no longer usable after close. Calling shutdown before close is recommended for connection-oriented sockets.
Establish a connection. If the socket is blocking, connect waits for the connection to be made. If the socket is nonblocking, connect returns immediately and the connection attempt is still in progress.
Can be overridden to support other addresses.
Get a text description of this socket's error status, and clear the socket's error status.
Get a socket option.
Common case of getting integer and boolean options.
Get the linger option.
Get a timeout (duration) option.
Listen for an incoming connection. bind must be called before you can listen. The backlog is a request of how many pending incoming connections are queued until accepted.
Receive data on the connection. If the socket is blocking, receive waits until there is data to be received.
Receive data and get the remote endpoint Address. If the socket is blocking, receiveFrom waits until there is data to be received.
Send data on the connection. If the socket is blocking and there is no buffer space left, send waits.
Send data to a specific destination Address. If the destination address is not specified, a connection must have been made and that address is used. If the socket is blocking and there is no buffer space left, sendTo waits.
Enables TCP keep-alive with the specified parameters.
Set a socket option.
Common case for setting integer and boolean options.
Set the linger option.
Sets a timeout (duration) option, i.e. SocketOption.SNDTIMEO or RCVTIMEO. Zero indicates no timeout.
Disables sends and/or receives.
Get the socket's address family.
Get/set socket's blocking flag.
Get underlying socket handle.
Property that indicates if this is a valid, alive socket.
Local endpoint Address.
Releases the underlying socket handle from the Socket object. Once it is released, you cannot use the Socket object's methods anymore. This also means the Socket destructor will no longer close the socket - it becomes your responsibility.
Remote endpoint Address.
Wait for a socket to change status. A wait timeout of core.time.Duration or TimeVal, may be specified; if a timeout is not specified or the TimeVal is null, the maximum timeout is used. The TimeVal timeout has an unspecified value when select returns.
Wait for a socket to change status. A wait timeout of core.time.Duration or TimeVal, may be specified; if a timeout is not specified or the TimeVal is null, the maximum timeout is used. The TimeVal timeout has an unspecified value when select returns.
Send or receive error code. See wouldHaveBlocked, lastSocketError and Socket.getErrorText for obtaining more information about the error.
Class that creates a network communication endpoint using the Berkeley sockets interface.