| Did you know ... | Search Documentation: |
| Send methods |
new(S, socket(File)), send(S, connect), ...
To connect to an inet domain socket, use:
new(S, socket(tuple(Host, Port))), send(S, connect), ...
socket->connect
is a no-op if socket<-status
is already connected.
<-status:
accepted (i.e. it is a clone of a server
socket handling a connection), the default is to object->free
the socket object.|tuple|int*,
domain=[{unix,inet}]<-address.
Unix-domain sockets appear as an entry in the filesystem and are only supported on Unix systems.
After a socket has been created and the appropriate attributes
(notably
stream->input_message)
have been specified the socket is activated using
socket->listen
for server sockets and socket->connect
for client sockets.
->accept_message
when specified. The second argument is the backlog. It
specifies how many pending requests for connections are tolerated. Any
new connect request will be denied. The default is 5.
If the reuse argument is @on,
the system tries to reuse the specified port, dispite it still being in
use. This option is needed to restart a service at the same -well known-
port after an dirty shut-down. If you are security minded, check the
internet on setsockopt() for the option SO_REUSEADDR before
activating this option.
If an inet domain socket was created with its port specified as 0,
the system will select an available port. The actually used port can be
requested from the socket
object using socket<-address
after this method completed successfully.