Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Net - <b>hang up</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
HANG UP

Command code
. Hex 12 - wait option
. Hex 92 - no-wait option

Fields required
. NCB_LSN
. NCB_POST@     (if no-wait option is used)
. NCB_LANA_NUM  (number of the adapter you want to hang up)

Field returned
. NCB_RETCODE
. NCB_CMD_CPLT

Immediate return codes
. Hex 00    - Command has no immediate errors
. Hex 03    - Invalid command
. Hex 21    - Interface busy
. Hex 22    - Too many commands outstanding
. Hex 23    - Invalid number in NCB_LANA_NUM field
. Hex 40/4F - Unusual network condition
. Hex 50/FE - Adapter malfunction

Final return codes
. Hex 00    - Command complete
. Hex 03    - Invalid command
. Hex 05    - Command time-out
. Hex 08    - Invalid local session number
. Hex 0A    - Session closed
. Hex 0B    - Command canceled
. Hex 18    - Session ended abnormally
. Hex 21    - Interface busy
. Hex 22    - Too many commands outstanding
. Hex 23    - Invalid number in NCB_LANA_NUM field
. Hex 40/4F - Unusual network condition
. Hex 50/FE - Adapter malfunction

Function
This command closes the session with the name on the network indicated by the
local session number. Hex 00 (command completed) is returned on a normal close
and hex 0A (session closed) or hex 08 (invalid local session number) is
returned if the session is already closed or does not exist.

When a Hang Up command is received, all pending local Receive commands are
ended and returned to the issuer with "session closed" in the NCB_RETCODE
field. The termination is valid regardless of whether any data had been
transferred by the pending command. If a local Send command is pending, the
Hang Up command delays until the Send is complete or until approximately 20
seconds have elapsed. This delay occurs whether the command has begun to
transfer data or is waiting for the remote computer to issue a Receive
command. The Hang Up command is performed if any of the following conditions
occur:
. The Send command is complete.
. The Send command has immediatley ended.
. The Send command fails because the session was terminated by the other
  computer with a Hang Up command.
. The Send command fails because of the time-out specified when the session
  was opened.

If one of the above conditions does not occur within 20 seconds after the Hang
Up command is executed, the Hang Up command is retured with a hex 05 (command
timed out), and the sessions immediately ends.

When a session closes, all Send and Receive, except Receive Any, commands
pending on the closed session are returned to the issuer with hex 0A (session
closed). If one Receive Any command is pending for that session, it is
returned with a hex 0A (session closed). Only one Receive Any command is
returned even though many Receive Any commands may be pending. Even though a
single Receive Any command is returned, many Send or Receive commands can be
returned when pending.

When a session abnormally ends, all outstanding commands for that session are
returned to the issuer with hex 18 (session ended abnormally).

See Also: Session support commands

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson