tulsa(n) 1.0 tulsa "tulsa"

Name

tulsa - Tcl Unix Local Sockets, Eh?

Table Of Contents

Synopsis

  • package require Tcl 8.6
  • package require tulsa ?1.0?

Description

The Tulsa Tcl extension provides server, client, and pair UNIX socket(2)s. Tulsa sockets are Tcl channels and as such support standard Tcl channel configuration options.

COMMANDS

tulsa pair

Returns a connected pair of channels as a 2-element list.

tulsa client path

Connects to server at path. Returns the client channel.

tulsa server path

Opens a server at path and listens for incoming connections. A connection point at path is created on open and removed on close. Exceptional conditions such as abrupt program termination may prevent removing the connection point. Returns the server channel.

tulsa accept channel

Accepts a connection on a server channel. If there are no pending connections, blocking channels will block until a connection arrives. Returns the accepted client channel, or an empty string if the channel is non-blocking and there are no pending connections.

tulsa tulsify fd

Wraps a system-specific file descriptor in a new Tulsa client channel. Returns the client channel.

tulsa srdopts

Returns a list of readable server options provided by Tulsa.

tulsa swropts

Returns a list of writable server options provided by Tulsa.

tulsa crdopts

Returns a list of readable client options provided by Tulsa.

tulsa cwropts

Returns a list of writable client options provided by Tulsa.

COMMON CONFIGURATION OPTIONS

-error

Returns the current error status.

-closeonexec

Sets or retrieves the close-on-exec flag.

-handle

Returns the system-specific handle.

SERVER CONFIGURATION OPTIONS

-connectto

Returns the recommended connection point (path) to the server.

-openedon

Returns the path used to open the server.

CLIENT CONFIGURATION OPTIONS

-peerinfo

Returns a dict with keys euid and egid.

-receivetimeout

Sets or retrieves the receive timeout as a floating point number of seconds.

-sendtimeout

Sets or retrieves the send timeout as a floating point number of seconds.

-sysreceivebuffersize

Sets or retrieves the system receive buffer size.

-syssendbuffersize

Sets or retrieves the system send buffer size.

-receivelowatermark

Sets or retrieves the system receive low water mark. May not be available. Check tulsa crdopts or tulsa cwropts.

-sendlowatermark

Sets or retrieves the system send low water mark. May not be available. Check tulsa crdopts or tulsa cwropts.

Keywords

socket, unix

Category

Networking