srepl

package
v0.7.17 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: EPL-1.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is a plain-text socket REPL server. Each connection gets an independent read-eval-print loop.

func Start

func Start(host string, port int, portFile string) (*Server, error)

Start creates and starts a socket REPL server on the given host and port. Port 0 means auto-assign a free port.

func (*Server) Host

func (s *Server) Host() string

Host returns the host the server is listening on.

func (*Server) Port

func (s *Server) Port() int

Port returns the port the server is listening on.

func (*Server) Serve

func (s *Server) Serve()

Serve accepts connections in a loop. Blocks until Stop is called.

func (*Server) Stop

func (s *Server) Stop()

Stop shuts down the server and cleans up the port file.

Jump to

Keyboard shortcuts

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