telnetsrv

package
v2.16.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server - the telnet server struct

func New

func New(host string, port int, onErrorTimeout, sendStatsTimeout, maxIdleConnectionTimeout string, maxBufferSize int64, collector *collector.Collector, stats *tsstats.StatsTS, logger *zap.Logger, sharedConnectionCounter *uint32, maxTelnetConnections uint32, telnetHandler TelnetDataHandler) (*Server, error)

New - creates a new telnet server

func (*Server) Listen

func (server *Server) Listen() error

Listen - starts to listen and to handle the incoming messages

func (*Server) Shutdown

func (server *Server) Shutdown() error

Shutdown - stops listening

type TelnetDataHandler

type TelnetDataHandler interface {

	// Handle - handles the data and send
	Handle(line string)

	// sourceName - returns the connection type name
	SourceName() string
}

TelnetDataHandler - handles the data from the telnet interface

Jump to

Keyboard shortcuts

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