Constructor.
Destructor. Calls close() if indicated by close_in_destructor.
Flags supported by accept4().
Accepts a connection from a listening socket and sets this.fd to the accepted socket file descriptor.
Accepts a connection from a listening socket and sets this.fd to the accepted socket file descriptor.
Accepts a connection from a listening socket and sets this.fd to the accepted socket file descriptor.
Assigns a local address to this socket. This socket needs to have been created by socket().
Resets the file descriptor, address and port. Called from close(), should be called otherwise only in special situations.
Closes the socket and resets the file descriptor, address and port.
Connects this socket the specified address and port.
Calls getsockopt(SOL_SOCKET, SO_ERROR) to obtain the current error code for this socket.
Required by ISelectable.
Formats information about the socket into the provided buffer.
Obtains the remote socket address.
Obtains the local socket address.
Obtains the value of a socket option, writing the value data to dst.
Calls getsockopt() to obtain the value of a socket option.
listen() marks this socket as a passive socket, that is, as a socket that will be used to accept incoming connection requests using accept().
Receives dst.length bytes from the remote but at most as possible with one attempt.
Sends as many src bytes as possible to the remote.
Sets the value of a socket option, using the value data in src. The actual value data type and length depends on the particular option.
Calls setsockopt() to sets the value of a socket option to val.
The shutdown() call causes all or part of a full-duplex connection on the socket to be shut down.
Creates a socket endpoint for communication and sets this.fd to the corresponding file descriptor.
Calls send() to send as many src bytes as possible.
Calls getsockopt(SOL_SOCKET, SO_ERROR) to obtain the current error code for the socket referred to by fd.
If true, the destructor will call close(). Enabled by socket()/accept() on success, disabled by close() and socket()/accept() on failure. Should be modified otherwise only in special situations.
File descriptor. Set by socket()/accept() and reset by close() and clear(). Should be modified otherwise only in special situations.
Address struct (sin_addr/sin6_addr) length.
If true, send() and therefore write() are requested not to send SIGPIPE on errors when this socket is stream oriented (e.g. TCP) and the other end breaks the connection.
Attempts to write src.length bytes, see IOutputDevice.write() documentation.
Abstract socket class