CONNECT(1)
<srackham@methods.co.nz>
v0.6.2,
January 2004
NAME
connect - connection manager client
SYNOPSIS
connect [-s session_name] [-g server_name] [-i poll_interval] [-l link_name] [-p server_port] [-n] [-v] command
DESCRIPTION
This program is a command line client for connectd(8), it implements the connect protocol. connect allows the user to send link control and management commands via a connectd server.
OPTIONS
- -s session_name
-
Specify session name. Defaults to username@hostname where username is the current login name and hostname is the local host name.
- -g server_name
-
Name or IP address of gateway server. Default 127.0.0.1.
- -i poll_interval
-
The interval in seconds to use when polling the server for command completion. Minimum value 1 second, default value 2 seconds.
- -l link_name
-
link_name is the name used by connectd(8) to identify the link. Default is the server's default link.
- -n
-
Exit as soon as the command has been accepted by the server, don't wait for server to signal command completion before returning. By default connect does not exit until the server signals command completion.
- -p server_port
-
Server listens on this socket number. Default value 8235. Minimum value 1024, maximum value 49151.
- -v
-
Verbose. Print connection/disconnection progress indicator.
CONNECT COMMANDS
- open
-
Create a new link session, if the physical connection is closed then open it.
- close
-
Close connect session. The link will close if this command closes the last remaining session for the open link.
- sessions
-
Print a list of active sessions on all links.
- links
-
Print the status of all links.
- status
-
This is the same as the links command except only the specified or default link is listed. The returned exit code reflects the status of the link (see Response Codes in CONNECT PROTOCOL section of connectd(8) man page).
- forceclose
-
Close the link immediately irrespective of whether or not sessions are currently active.
- forcelock
-
The same as the forceclose command except that no sessions can be started until the unlock command has been executed.
- lock
-
The same as the forcelock command except that the link is not forced closed, instead the lock is applied only after the link has been closed by some other event.
- unlock
-
Allow new sessions to be opened.
- version
-
Return server name, version and date delimited by space character.
SESSIONS COMMAND OUTPUT
Each line contains the link name followed by session name followed by the the time the session has been open (h:mm:ss format). The following is an example printout:
internet srackham@quark 10:56:12 internet _mail_ 2:25:54 internet peggy@proton 7:34:21
LINKS COMMAND OUTPUT
The links command prints an output like:
Link State RCount SCount UpTime TotTime Lock LockBy ----------------------------------------------------------------------- internet open 1 4 00:00:12 00:00:25 unlocked srackham@quark
NOTE: . The values are separated by a single tab character. . The header and separator lines shown above are not displayed. . The default link is the first link in the list.
- Link
-
The link name.
- State
-
Can be opening, open, failed, closing, closed, dropped or idle. The failed state indicates the previous open command failed to open the link after exhausting all retries. The dropped state indicates the link was closed by an external event. The idle state indicates no sessions are currently active but the link is still open (only applies when the leave_open option is enabled).
- RCount
-
Retry count for most recent open command.
- SCount
-
Session count, number of open sessions.
- UpTime
-
Time (HH:MM:SS) the link has been up. Defined only when link is open.
- TotTime
-
The total time (HH:MM:SS) the link has been up since server started.
- Lock
-
Unlocked, locking or locked.
- LockBy
-
Name of client that initiated the lock, blank if unlocked.
EXIT CODES
- 0
-
A non-status command succeeded.
- 0..99
-
A status command succeeded, the exit code is the same as the status_command response_code (see connectd(8)).
- 100
-
Illegal command
- 101
-
A command execution error occured.
- 102
-
An unexpected program error occured.
FILES
- ~/.connectrc
-
This is the optional connect run control file, it is used to customise the program parameters.
CONNECTRC FILE FORMAT
Each parameter occupies a separate line and is formatted like <parameter_name>=<value>. Blank lines and lines beginning with a # character are ignored. Parameters are trimmed of leading and trailing white spaces. Valid parameter names are:
server_name, link_name, session_name, poll_interval, server_port
See OPTIONS for a description of these parameters.
Command line parameter values override settings in the run control file.
Here's an example .connectrc file:
# ~/.connectrc # Example connect run control file. server_name = quark link_name = internet session_name = srackham poll_interval = 1 server_port = 8235
SEE ALSO
connectd(8)
BUGS
They almost certainly exist. Send comments and bug reports to Stuart Rackham <srackham@methods.co.nz>
AUTHOR
Stuart Rackham <srackham@methods.co.nz>

