DESCRIPTION¶
Arguments: |
---|
Optional hook to specifiy how to perform a single telnet negotiation. Hook setting may be any closure or a string. If not set, most telnet options are rejected (read: only a very minimal negotiation takes place).
The hook is called whenever the driver receives a demand for option negotiation for any option the driver does not handle itself. By default, the driver deals with the following options:
TELOPT_ECHO
: Echo optionTELOPT_SGA
: Suppress Go Ahead (nearly always on)TELOPT_COMPRESS
: Mud client compression protocol (obsolete)TELOPT_COMPRESS2
: Mud client compression protocol V2
For all other telnet options negotiations, this hook is called.
The hook has then to perform the negotiation using the :efun::binary_message
(E).
Alternatively, if H_NOECHO
(H) is set, this hook is called for all telnet data received.
If the setting is a string, it used as the name of an lfun to call in this_player()
. Closures are just called, with unbound lambda-closures being bound to this_player()
prior to execution.
The hook is called for a ‘DO/DONT/WILL/WONT <opt>’ with the action (DO/DONT/...) as the first, and <opt> as the second argument.
For example:, if the driver receives the sequence
IAC SB <opt> <opts>...
followed by IAC SB/SE, the hook is called with ‘SB’ as first argument, <opt> as second, and <opts> as an array of integers as third argument.
Negotiations¶
- An incomplete list of telnet negotiations this hook is called for includes the following:
SB: Suboption negotiation
TELOPT_LINEMODE
: linemodeTELOPT_NAWS
: window sizeTELOPT_TTYPE
: terminal typeTELOPT_TM
: timing markTELOPT_NEWENV
: remote environment variablesTELOPT_ENVIRON
: remote environment variablesTELOPT_XDISPLOC
: remote X display addressTELOPT_TSPEED
: terminal speedTELOPT_BINARY
: binary data, needed for non-ASCII charsetsTELOPT_EOR
: TinyFugue prompt marker (together with EOR)TELOPT_MSP
: Mud Sound ProtocolTELOPT_MXP
: Mud Extension ProtocolTELOPT_MSSP
: Mud Server Status ProtocolTELOPT_GMCP
: Generic Mud Communication Protocol