telnet

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 6 Imported by: 1

README

telnet

Golang package for a simple telnet server

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Telnet

type Telnet struct {
	Motd       string
	CtrlDclose bool
	// contains filtered or unexported fields
}

func New

func New(address string) *Telnet

func (*Telnet) Close

func (t *Telnet) Close() error

func (*Telnet) Read

func (t *Telnet) Read(p []byte) (n int, err error)

Read returns data from connected clients. It blocks until data is available

func (*Telnet) SetCtrlDClose added in v1.2.0

func (t *Telnet) SetCtrlDClose(close bool)

SetCtrlDClose changes whether Ctrl-D disconnects newly connected clients.

func (*Telnet) SetLogger

func (t *Telnet) SetLogger(logger *log.Logger)

func (*Telnet) SetMotd added in v1.2.0

func (t *Telnet) SetMotd(motd string)

SetMotd changes the message sent to newly connected clients.

func (*Telnet) Write

func (t *Telnet) Write(p []byte) (n int, err error)

Write writes data to all connected clients

Jump to

Keyboard shortcuts

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