dosbox

package
v0.0.0-...-9f27993 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package dosbox implements the server side of the DOSBox IPX protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Protocol

type Protocol struct {
	// A new Node is created in this network each time a new client
	// is created.
	Network network.Network

	// If non-zero, always send at least one packet every few seconds to
	// keep the UDP connection open. Some NAT networks and firewalls can be
	// very aggressive about closing off the ability for clients to receive
	// packets on particular ports if nothing is received for a while.
	// This controls the time for keepalives.
	KeepaliveTime time.Duration

	// If not nil, log entries are written as clients connect and
	// disconnect.
	Logger *log.Logger
}

Protocol is an implementation of the server.Protocol interface that implements the dosbox protocol.

func (*Protocol) IsRegistrationPacket

func (p *Protocol) IsRegistrationPacket(packet *ipx.Packet) bool

IsRegistrationPacket returns true if the given packet is a DOSbox protocol registration packet.

func (*Protocol) StartClient

func (p *Protocol) StartClient(ctx context.Context, inner ipx.ReadWriteCloser, remoteAddr net.Addr) error

StartClient is invoked as a new goroutine when a new client connects.

Jump to

Keyboard shortcuts

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