mud

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const AYT = 246 // 0xF6	Are You Here?
View Source
const DO = 253 // 0xFD	Do something
View Source
const DONT = 254 // 0xFE	Don't do something
View Source
const EC = 247 // 0xF7	Erase Character
View Source
const ECHO = 1 // 0x01	Echo
View Source
const EL = 248 // 0xF8	Erase Line
View Source
const GA = 249 // 0xF9	Go Ahead
View Source
const GMCP = 201 // 0xC9	Generic MUD Communication Protocol
View Source
const IAC = 255 // 0xFF	Interpret as Command
View Source
const MSSP = 70 // 0x46	MUD Server Status Protocol
View Source
const MXP = 91 // 0x5B	MUD eXtension Protocol
View Source
const NAWS = 31 // 0x1F	Negotiate About Window Size
View Source
const NENV = 39 // 0x27	New Environment
View Source
const NOP = 241 // 0xF1	No operation
View Source
const SB = 250 // 0xFA	Subnegotiation Begin
View Source
const SE = 240 // 0xF0	Subnegotiation End
View Source
const TTYPE = 24 // 0x18	Terminal Type
View Source
const WILL = 251 // 0xFB	Will do something
View Source
const WONT = 252 // 0xFC	Won't do something
View Source
const ZMP = 93 // 0x5D	Zenith MUD Protocol

Variables

This section is empty.

Functions

This section is empty.

Types

type CSIMessage

type CSIMessage struct {
	Parameter    bytes.Buffer
	Intermediate bytes.Buffer
	Command      byte
}

func (CSIMessage) IsMessage

func (CSIMessage) IsMessage()

type EOF

type EOF bool

func (EOF) IsMessage

func (EOF) IsMessage()

type IACMessage

type IACMessage struct {
	Command byte
	Args    []byte
	// contains filtered or unexported fields
}

func NewIACMessage

func NewIACMessage() *IACMessage

func (IACMessage) Eq

func (iac IACMessage) Eq(command byte, args ...byte) bool

func (IACMessage) IsMessage

func (IACMessage) IsMessage()

func (*IACMessage) Reset

func (iac *IACMessage) Reset()

func (*IACMessage) Scan

func (iac *IACMessage) Scan(b byte) bool

func (IACMessage) String

func (iac IACMessage) String() string

type IncompleteLine

type IncompleteLine struct{ *bytes.Buffer }

func (IncompleteLine) IsMessage

func (IncompleteLine) IsMessage()

type Line

type Line struct{ *bytes.Buffer }

func (Line) IsMessage

func (Line) IsMessage()

type MudConfig

type MudConfig struct {
	IACDebug bool
	Host     string `flag:"H|mud.pkuxkx.net|服务器 {IP/Domain}"`
	Port     int    `flag:"P|8080|服务器 {Port}"`
}

type MudMessage

type MudMessage interface {
	IsMessage()
}

type MudServer

type MudServer struct {
	printer.SimplePrinter
	// contains filtered or unexported fields
}

func NewMudServer

func NewMudServer(config MudConfig) *MudServer

func (*MudServer) Input

func (mud *MudServer) Input() <-chan string

func (*MudServer) Run

func (mud *MudServer) Run()

func (*MudServer) SetScreen

func (mud *MudServer) SetScreen(w io.Writer)

func (*MudServer) Stop

func (mud *MudServer) Stop()

type ReaderWithDeadline

type ReaderWithDeadline interface {
	io.Reader
	SetReadDeadline(t time.Time) error
}

type Scanner

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

func NewScanner

func NewScanner(r ReaderWithDeadline) *Scanner

func (*Scanner) Scan

func (s *Scanner) Scan() MudMessage

type ScannerStatus

type ScannerStatus int

Jump to

Keyboard shortcuts

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