srepl

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: EPL-1.0 Imports: 10 Imported by: 0

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