open_network_connection

lpmoo-1.2/doc/builtins/open_network_connection · 1.3 KB

From the archive lpmoo-1.2.tar.gz

Download the archive   « Back to the archive contents

NAME
	open_network_connection - initiate a network connection

SYNOPSIS
	obj open_network_connection(host, port[, obj])

DESCRIPTION
	This builtin is only functional if LPMOO has been built with
	networking support and the outbound_net configuration option
	is enabled. Otherwise, E_PERM will be returned.

	A network connection is established with the named host
	(specified with a string hostname or IP address) and the given
	TCP port. If resource limitations on the local machine prevent
	the connection from being made (for example, if a DNS resolver
	is not available), E_QUOTA will be returned. If the connection
	could not be established for any other reason, E_INVARG will be
	returned.

	The third optional argument, if present, specifies what object
	will act as the "listener" for this connection. That is, the
	verbs :do_login_command and friends will be called in this
	object when activities relating to the connection occur. If not
	specified, this object defaults to #0.

	This builtin will suspend until the connection is established.

	Upon successful connection to the remote host, a negative
	object number will be returned to henceforth refer to the
	connection. See the LambdaMOO Programmer's Manual for more
	information.

	This builtin requires wizard permissions.

SEE ALSO
	listen, unlisten

Site Stats

Snippets: 1791
Codebases: 571