socket_listen

ldmud-3.3.719/src/util/xerq/docs/socketd/socket_listen · 643 B

From the archive ldmud-3.3.719.tar.gz

Download the archive   « Back to the archive contents

SYNOPSIS
	int socket_listen(int port, closure callback)

	void callback(int fd, int action, mixed a, mixed b)

DESCRIPTION
	Opens a tcp port for listening.  Returns the file descriptor
	for the socket.

CALLBACK
	SOCKET_READY
	  The socket is open and awaiting connections.

	SOCKET_ACCEPT
	  An incoming connection has been deteced on the socket, accept
	  it with socket_accept().

	SOCKET_CLOSE
	  The socket has closed.

	SOCKET_ERROR
	  An error has been detected on the socket.
	  A contains the error code obtained from the erq daemon.
	  B contains the value of errno in most cases.

SEE ALSO
	sockets, socket_accept(), socket_close()

Site Stats

Snippets: 1791
Codebases: 571