options

package
v0.0.0-...-6a03c1f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2021 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinaryTransmissionOption

func BinaryTransmissionOption(c *telnet.Connection) telnet.Negotiator

BinaryTransmissionOption enables Binary transmission negotiation on a Server.

func EchoOption

func EchoOption(c *telnet.Connection) telnet.Negotiator

EchoOption enables NAWS negotiation on a Server.

func ExposeNAWS

func ExposeNAWS(c *telnet.Connection) telnet.Negotiator

ExposeNAWS enables NAWS negotiation on a Client.

func LinemodeOption

func LinemodeOption(c *telnet.Connection) telnet.Negotiator

LinemodeOption enables Linemode negotiation on a Server.

func NAWSOption

func NAWSOption(c *telnet.Connection) telnet.Negotiator

NAWSOption enables NAWS negotiation on a Server.

func SuppressGoAheadOption

func SuppressGoAheadOption(c *telnet.Connection) telnet.Negotiator

SuppressGoAheadOption will enable GO-AHEAD suppression negotiation on a Server.

func TerminalTypeOption

func TerminalTypeOption(c *telnet.Connection) telnet.Negotiator

TerminalTypeOption enables NAWS negotiation on a Server.

Types

type BinaryHandler

type BinaryHandler struct {
	// contains filtered or unexported fields
}

BinaryHandler negotiates BINARY for a specific connection.

func (*BinaryHandler) HandleDo

func (e *BinaryHandler) HandleDo(c *telnet.Connection)

HandleDo is called when an IAC DO command is received for this option, indicating the client is requesting the option to be enabled.

func (*BinaryHandler) HandleSB

func (e *BinaryHandler) HandleSB(c *telnet.Connection, body []byte)

HandleSB is called when a subnegotiation command is received for this option. body contains the bytes between `IAC SB <OptionCode>` and `IAC SE`.

func (*BinaryHandler) HandleWill

func (e *BinaryHandler) HandleWill(c *telnet.Connection)

HandleWill is called when an IAC WILL command is received for this option, indicating the client is willing to enable this option.

func (*BinaryHandler) Offer

func (e *BinaryHandler) Offer(c *telnet.Connection)

Offer is called when a new connection is initiated. It offers the handler an opportunity to advertise or request an option.

func (*BinaryHandler) OptionCode

func (e *BinaryHandler) OptionCode() byte

OptionCode returns with the code used to negotiate BINARY modes.

type EchoHandler

type EchoHandler struct {
	// contains filtered or unexported fields
}

EchoHandler negotiates ECHO for a specific connection.

func (*EchoHandler) HandleDo

func (e *EchoHandler) HandleDo(c *telnet.Connection)

HandleDo is called when an IAC DO command is received for this option, indicating the client is requesting the option to be enabled.

func (*EchoHandler) HandleSB

func (e *EchoHandler) HandleSB(c *telnet.Connection, body []byte)

HandleSB is called when a subnegotiation command is received for this option. body contains the bytes between `IAC SB <OptionCode>` and `IAC SE`.

func (*EchoHandler) HandleWill

func (e *EchoHandler) HandleWill(c *telnet.Connection)

HandleWill is called when an IAC WILL command is received for this option, indicating the client is willing to enable this option.

func (*EchoHandler) Offer

func (e *EchoHandler) Offer(c *telnet.Connection)

Offer is called when a new connection is initiated. It offers the handler an opportunity to advertise or request an option.

func (*EchoHandler) OptionCode

func (e *EchoHandler) OptionCode() byte

OptionCode returns with the code used to negotiate ECHO modes.

type LinemodeHandler

type LinemodeHandler struct {
	// contains filtered or unexported fields
}

LinemodeHandler negotiates ECHO for a specific connection.

func (*LinemodeHandler) HandleDo

func (e *LinemodeHandler) HandleDo(c *telnet.Connection)

HandleDo is called when an IAC DO command is received for this option, indicating the client is requesting the option to be enabled.

func (*LinemodeHandler) HandleSB

func (e *LinemodeHandler) HandleSB(c *telnet.Connection, body []byte)

HandleSB is called when a subnegotiation command is received for this option. body contains the bytes between `IAC SB <OptionCode>` and `IAC SE`.

func (*LinemodeHandler) HandleWill

func (e *LinemodeHandler) HandleWill(c *telnet.Connection)

HandleWill is called when an IAC WILL command is received for this option, indicating the client is willing to enable this option.

func (*LinemodeHandler) Offer

func (e *LinemodeHandler) Offer(c *telnet.Connection)

Offer is called when a new connection is initiated. It offers the handler an opportunity to advertise or request an option.

func (*LinemodeHandler) OptionCode

func (e *LinemodeHandler) OptionCode() byte

OptionCode returns with the code used to negotiate ECHO modes.

type NAWSHandler

type NAWSHandler struct {
	Width  uint16
	Height uint16
	// contains filtered or unexported fields
}

NAWSHandler negotiates NAWS for a specific connection.

func (*NAWSHandler) HandleDo

func (n *NAWSHandler) HandleDo(c *telnet.Connection)

HandleDo processes the monitor size options for NAWS.

func (*NAWSHandler) HandleSB

func (n *NAWSHandler) HandleSB(c *telnet.Connection, b []byte)

HandleSB processes the information about window size sent from the client to the server.

func (*NAWSHandler) HandleWill

func (n *NAWSHandler) HandleWill(c *telnet.Connection)

HandleWill is not implemented for NAWS.

func (*NAWSHandler) Offer

func (n *NAWSHandler) Offer(c *telnet.Connection)

Offer sends the IAC DO NAWS command to the client.

func (*NAWSHandler) OptionCode

func (n *NAWSHandler) OptionCode() byte

OptionCode returns the IAC code for NAWS.

type SuppressGoAheadHandler

type SuppressGoAheadHandler struct {
	// contains filtered or unexported fields
}

SuppressGoAheadHandler negotiates ECHO for a specific connection.

func (*SuppressGoAheadHandler) HandleDo

func (e *SuppressGoAheadHandler) HandleDo(c *telnet.Connection)

HandleDo is called when an IAC DO command is received for this option, indicating the client is requesting the option to be enabled.

func (*SuppressGoAheadHandler) HandleSB

func (e *SuppressGoAheadHandler) HandleSB(c *telnet.Connection, body []byte)

HandleSB is called when a subnegotiation command is received for this option. body contains the bytes between `IAC SB <OptionCode>` and `IAC SE`.

func (*SuppressGoAheadHandler) HandleWill

func (e *SuppressGoAheadHandler) HandleWill(c *telnet.Connection)

HandleWill is called when an IAC WILL command is received for this option, indicating the client is willing to enable this option.

func (*SuppressGoAheadHandler) Offer

Offer is called when a new connection is initiated. It offers the handler an opportunity to advertise or request an option.

func (*SuppressGoAheadHandler) OptionCode

func (e *SuppressGoAheadHandler) OptionCode() byte

OptionCode returns with the code used to negotiate ECHO modes.

type TerminalTypeHandler

type TerminalTypeHandler struct {
	// contains filtered or unexported fields
}

TerminalTypeHandler negotiates TerminalType for a specific connection.

func (*TerminalTypeHandler) HandleDo

func (e *TerminalTypeHandler) HandleDo(c *telnet.Connection)

HandleDo is called when an IAC DO command is received for this option, indicating the client is requesting the option to be enabled.

func (*TerminalTypeHandler) HandleSB

func (e *TerminalTypeHandler) HandleSB(c *telnet.Connection, body []byte)

HandleSB is called when a subnegotiation command is received for this option. body contains the bytes between `IAC SB <OptionCode>` and `IAC SE`.

func (*TerminalTypeHandler) HandleWill

func (e *TerminalTypeHandler) HandleWill(c *telnet.Connection)

HandleWill is called when an IAC WILL command is received for this option, indicating the client is willing to enable this option.

func (*TerminalTypeHandler) Offer

func (e *TerminalTypeHandler) Offer(c *telnet.Connection)

Offer is called when a new connection is initiated. It offers the handler an opportunity to advertise or request an option.

func (*TerminalTypeHandler) OptionCode

func (e *TerminalTypeHandler) OptionCode() byte

OptionCode returns with the code used to negotiate TerminalType modes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL