Documentation
¶
Index ¶
- Constants
- type CharacterModeTracker
- type DebugLog
- type DebugLogConfig
- type KeyboardFeed
- type LineFeed
- func (l *LineFeed) CharacterMode() bool
- func (l *LineFeed) Flush(newline bool)
- func (l *LineFeed) LineIn(t *telnet.Terminal, data telnet.TerminalData)
- func (l *LineFeed) SetCharacterMode(charMode bool)
- func (l *LineFeed) SetSuppressLocalEcho(suppress bool)
- func (l *LineFeed) SuppressLocalEcho() bool
- func (l *LineFeed) Text() string
- type LineFeedConfig
Constants ¶
const LevelNone slog.Level = -8
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CharacterModeTracker ¶ added in v0.7.0
type CharacterModeTracker struct {
// contains filtered or unexported fields
}
func NewCharacterModeTracker ¶ added in v0.7.0
func NewCharacterModeTracker(t *telnet.Terminal) *CharacterModeTracker
func (*CharacterModeTracker) IsCharacterMode ¶ added in v0.7.0
func (t *CharacterModeTracker) IsCharacterMode() bool
IsCharacterMode will return true if both the ECHO and SUPPRESS-GO-AHEAD options are enabled. Technically this is supposed to be the case when NEITHER or BOTH are enabled, as traditionally, "kludge line mode", the line-at-a-time operation you might be familiar with, is supposed to occur when either ECHO or SUPPRESS-GO-AHEAD, but not both, are enabled. However, MUDs traditionally operate in a line-at-a-time manner and do not usually request SUPPRESS-GO-AHEAD (instead using IAC GA to indicate the location of a prompt to clients), resulting in a relatively common expectation that kludge line mode is active when neither telopt is active.
As a result, in order to allow the broadest support for the most clients possible, it's recommended that you activate both SUPPRESS-GO-AHEAD and EOR when you want to support line-at-a-time mode and activate both SUPPRESS-GO-AHEAD and ECHO when when you want to support character mode. If line-at-a-time is desired and EOR is not available, then leaving SUPPRESS-GO-AHEAD and ECHO both inactive and proceeding with line-at-a-time will generally work.
BBS's additionally sometimes use LINEMODE which can negotiate whether to use line or character mode in the form of the EDIT flag in MODE
func (*CharacterModeTracker) TelOptEvent ¶ added in v0.7.0
func (t *CharacterModeTracker) TelOptEvent(terminal *telnet.Terminal, data telnet.TelOptEvent)
type DebugLog ¶
type DebugLog struct {
// contains filtered or unexported fields
}
func NewDebugLog ¶
type DebugLogConfig ¶
type KeyboardFeed ¶
type KeyboardFeed struct {
// contains filtered or unexported fields
}
func NewKeyboardFeed ¶
func NewKeyboardFeed(terminal *telnet.Terminal, input io.Reader, lineFeed *LineFeed, characterMode *CharacterModeTracker) (*KeyboardFeed, error)
func (*KeyboardFeed) FeedLoop ¶
func (f *KeyboardFeed) FeedLoop() error
type LineFeed ¶ added in v0.4.0
type LineFeed struct {
LineOut telnet.TerminalDataHandler
EchoOut telnet.TerminalDataHandler
// contains filtered or unexported fields
}
func NewLineFeed ¶ added in v0.4.0
func NewLineFeed(terminal *telnet.Terminal, lineOut, echoOut telnet.TerminalDataHandler, config LineFeedConfig) *LineFeed
func (*LineFeed) CharacterMode ¶ added in v0.4.0
func (*LineFeed) LineIn ¶ added in v0.4.0
func (l *LineFeed) LineIn(t *telnet.Terminal, data telnet.TerminalData)