MongooseWhere programmers kick back and build silly things together.

All help topics · Link to this topic

Showing help on 'connection_info()'

Syntax: connection_info (OBJ <connection>) => MAP

Returns a MAP of network connection information for <connection>. At the time of writing, the following information is returned:

destination_address: The hostname of the connection. For incoming connections, this is the hostname of the connected user.
For outbound connections, this is the hostname of the outbound connection's destination.

destination_ip: The unresolved numeric IP address of the connection.

destination_port: For incoming connections, this is the local port used to make the connection.
For outbound connections, this is the port the connection was made to.

source_address: This is the hostname of the interface an incoming connection was made on. For outbound connections, this value is meaningless.

source_ip: The unresolved numeric IP address of the interface a connection was made on. For outbound connections, this value is meaningless.

source_port: The local port a connection connected to. For outbound connections, this value is meaningless.

protocol: Describes the protocol used to make the connection. At the time of writing, this could be IPv4 or IPv6.

outbound: Indicates whether a connection is outbound or not

tls: TLS connection information. This key is present only when ToastStunt was built with USE_TLS support.

E_INVARG is raised if <connection> is not valid or is disconnecting. E_PERM is raised if the programmer is not a wizard and is not <connection>.