Documentation ¶
Overview ¶
Package simulator provides a rudimentary simulation of a JNOS BBS, which can be used for testing JNOS-based services without connecting to a real BBS. This simulation implements only the features of JNOS that are used by package jnos.
To use this simulator, call Start to start it, then create a jnos/telnet Transport connecting to simulator.ListenAddress. Call the simulator's Stop method when it is no longer needed.
Index ¶
Constants ¶
const ListenAddress = "localhost:63425"
ListenAddress is the address to which the simulator listens. Connect to it with a telnet transport. Any login and password is accepted.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Simulator ¶
type Simulator struct {
// contains filtered or unexported fields
}
Simulator is a JNOS simulator.
func Start ¶
Start starts a new JNOS simulator. It returns a handle to the simulator, which can be examined after the interaction to see what messages were sent through the simulated BBS. The messages available to read from the simulation are those in the supplied messages files, which can be mbox-style files or transcripts of an actual JNOS session that read messages. home is the name of the default message area. The simulator's Stop method should be called when it is no longer needed.