telnet

package
v0.11.8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: MIT Imports: 7 Imported by: 4

Documentation

Overview

Package telnet provides a method of connecting to Winlink CMS over tcp ("telnet-mode")

Index

Constants

View Source
const (
	CMSTargetCall = "wl2k"
	CMSPassword   = "CMSTelnet"
	CMSAddress    = "server.winlink.org:8772"
)

Variables

View Source
var DefaultDialer = &Dialer{Timeout: 30 * time.Second}

Functions

func Dial

func Dial(addr, mycall, password string) (net.Conn, error)

func DialCMS

func DialCMS(mycall string) (net.Conn, error)

DialCMS dials a random CMS server through server.winlink.org.

The function will retry 4 times before giving up and returning an error.

func DialContext added in v0.10.0

func DialContext(ctx context.Context, addr, mycall, password string) (net.Conn, error)

func DialTimeout added in v0.7.0

func DialTimeout(addr, mycall, password string, timeout time.Duration) (net.Conn, error)

func Listen

func Listen(addr string) (ln net.Listener, err error)

Starts a new net.Listener listening for incoming connections.

The Listener takes care of the special Winlink telnet login.

Types

type Conn

type Conn struct {
	net.Conn
	// contains filtered or unexported fields
}

func (Conn) RemoteCall

func (conn Conn) RemoteCall() string

type Dialer added in v0.7.0

type Dialer struct{ Timeout time.Duration }

Dialer implements the transport.Dialer interface.

func (Dialer) DialURL added in v0.7.0

func (d Dialer) DialURL(url *transport.URL) (net.Conn, error)

DialURL dials telnet:// URLs

The URL parameter dial_timeout can be used to set a custom dial timeout interval. E.g. "2m".

func (Dialer) DialURLContext added in v0.10.0

func (d Dialer) DialURLContext(ctx context.Context, url *transport.URL) (net.Conn, error)

Notes

Bugs

  • Password is discarded and not supported yet.

Jump to

Keyboard shortcuts

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