Documentation ¶
Index ¶
- func EchoOption(c *telnet.Connection) telnet.Negotiator
- func ExposeNAWS(c *telnet.Connection) telnet.Negotiator
- func LinemodeOption(c *telnet.Connection) telnet.Negotiator
- func NAWSOption(c *telnet.Connection) telnet.Negotiator
- func SuppressGoAheadOption(c *telnet.Connection) telnet.Negotiator
- func TerminalTypeOption(c *telnet.Connection) telnet.Negotiator
- type EchoHandler
- type LinemodeHandler
- type NAWSHandler
- type SuppressGoAheadHandler
- func (e *SuppressGoAheadHandler) HandleDo(c *telnet.Connection)
- func (e *SuppressGoAheadHandler) HandleSB(c *telnet.Connection, body []byte)
- func (e *SuppressGoAheadHandler) HandleWill(c *telnet.Connection)
- func (e *SuppressGoAheadHandler) Offer(c *telnet.Connection)
- func (e *SuppressGoAheadHandler) OptionCode() byte
- type TerminalTypeHandler
- func (e *TerminalTypeHandler) HandleDo(c *telnet.Connection)
- func (e *TerminalTypeHandler) HandleSB(c *telnet.Connection, body []byte)
- func (e *TerminalTypeHandler) HandleWill(c *telnet.Connection)
- func (e *TerminalTypeHandler) Offer(c *telnet.Connection)
- func (e *TerminalTypeHandler) OptionCode() byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 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 ¶
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 ¶
func (e *SuppressGoAheadHandler) 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 (*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.