server

package
v0.0.0-...-c11a086 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpQotdServer

type HttpQotdServer interface {
	Start(port int, quotes chan string) error
	Close()
	SetMaxLength(ml int)
	SetDebug(debug bool)
}

External interface to the HttpQotdServer

func NewHTTP

func NewHTTP() HttpQotdServer

type TcpQotdServer

type TcpQotdServer interface {
	// To start the server, provide a port on which to listen and a channel
	// "quotes" from which to obtain new quotes
	Start(port int, quotes chan string) error

	// Close the server
	Close()

	// Set max quote length
	SetMaxLength(ml int)

	// Turn on debugging
	SetDebug(debug bool)
}

External interface to the TcpQotdServer

func NewTCP

func NewTCP() TcpQotdServer

Maximum allowed length for QOTD server is 512 as defined in RFC 865: http://tools.ietf.org/html/rfc865 Use this as default max length

type UdpQotdServer

type UdpQotdServer interface {
	// To start the server, provide a port on which to listen and a channel
	// "quotes" from which to obtain new quotes
	Start(port int, quotes chan string) error

	// Close the server
	Close()

	// Set max quote length
	SetMaxLength(ml int)

	// Turn on debugging
	SetDebug(debug bool)
}

External interface to the UdpQotdServer

func NewUDP

func NewUDP() UdpQotdServer

Maximum allowed length for QOTD server is 512 as defined in RFC 865: http://tools.ietf.org/html/rfc865 Use this as default max length

Jump to

Keyboard shortcuts

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