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>listen</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
LISTEN

Command code
. Hex 11 - wait option (use this carefully because it does not time out and
                       your program does not continue until the command is
                       satisfied)
. Hex 91 - no-wait option

Fields required
. NCB_CALLNAME  This can be specified in the first byte as *. The * is used
                to listen for a call from anyone to your name. If a name is
                specified in this field, it takes priority over a name of *.
. NCB_NAME
. NCB_RTO       (specified in 500 ms increments;
                if the field is set to hex 00, no receive time-outs occur)
. NCB_RTO       (specified in 500 ms increments;
                if the field is set to hex 00, no send time-outs occur)
. NCB_POST@     (if no-wait option is used)
. NCB_LANA_NUM  (number of the adapter you want to listen)

Field returned
. NCB_RETCODE
. NCB_LSN
. NCB_CALLNAME  (* specfies listen to anyone)
. NCB_CMD_CPLT

Immediate return codes
. Hex 00    - Command has no immediate errors
. Hex 03    - Invalid command
. Hex 09    - No resource available
. Hex 15    - Invalid name
. 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 0B    - Command canceled
. Hex 11    - Local session table full
. Hex 15    - Invalid name
. Hex 17    - Name was deleted
. Hex 18    - Session ended abnormally
. Hex 19    - Name conflict detected
. 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 enables a session to be established with the name specified in
the field, NCB_CALLNAME, using the name specified by the field, NCB_NAME. If
the field, NCB_CALLNAME, has a name starting with *, a session is established
with any network node that issues a Call command to the local name specified
by the NCB_NAME field.

A Listen command for a specific name has priority over a Listen command for
any name. Sessions can be established with either a local or a remote name.
Multiple sessions can be established with the same pair of names.

All Send and Receive commands for this session immediately end if they are
unsuccessful after the specified time-out intervals. If a Send command times
out, the session is abnormally terminated.

The time-out intervals are specified in 500-ms units (a value of zero means
that no time-out will occur). A Listen command does not time out, but it
occupies a session entry and is considered a pending session in information
returned on a Status command. Local session numbers (NCB_LSNs) are assigned in
a round-robin technique starting with the next available value within the
range of 1 to 254. Also, if an * is used for the called name, the name
initiating the call will be returned in the field, NCB_CALLNAME.

Hex 19 (name conflict detected) is returned if, during the completion of a
Listen command, a unique name exits in more than one table. All nodes with the
name registered, except for the one where the Listen command has returned
successfully, will report the same error.

See Also: Session support commands

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