next up previous contents
Next: CIL Up: Detailed Description of Commands Previous: BP   Contents

BYE

Gracefully shuts down socket connection to client.
Mnemonic:

GoodBYE.
Syntax:

BYE [pn]
pn: ZY port number to close (0 = TCP port 5240, 1 = TCP port 5241)
Return values:
Success:
BYE 1, pn, Closing Connection
Failure:
BYE 0, err_msg
pn: TCP port number, 5240 or 5241
err_msg: Should the command fail, this value will be an error message string, explaining the cause of failure. Failure modes include providing a ZY port number greater than 1 or less than 0 (the ZY currently only supports two TCP ports), and providing a non-numeric port number.
Remarks:

The ZY supports two TCP ports, at 5240 and 5241. Only one socket may connect to each port at one time. The ZY lists these as port 0 and port 1, respectively. BYE will close the specified port (0 or 1) if the parameter is given, or it will default to the port over which the command was issued, if the parameter is not given. For example, if a client connected to port 1 issues a BYE command with no parameters, BYE assumes port 1 is to be closed. A client connected to port 0 may close port 1 and vice-versa. Upon receipt of this command, the ZY closes the connection to the client computer and immediately waits for a new one. The following idiosyncrasies should be noted about this command:
  1. Though the port number is given as `0' or `1' when the command is issued, the acknowledged command string returned to the client lists the port as the actual TCP port number instead.
  2. The ZY should but currently does not trap port numbers outside the supported range of 0-1 as errors.
Both of these items will be addressed in future releases.
Example:
     send: BYE
  receive: BYE 1, 5240, Closing Connection
See also:

QQQ, RST

next up previous contents
Next: CIL Up: Detailed Description of Commands Previous: BP   Contents
Ramon E. Creager 2002-03-11