server

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

server provides a way to simulate lab devices over TCP/IP, allowing users to test and debug software that communicates with lab devices remotely

Index

Constants

View Source
const (
	CONN_TYPE = "tcp"
	BUF_SIZE  = 4096
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Handle([]byte) []byte
	Triggered() chan []byte
}

type Server

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

Server struct

func New

func New(device Handler, address string) (*Server, error)

Create a new server with given handler and address

func (*Server) Start

func (s *Server) Start()

Start server

func (*Server) Stop

func (s *Server) Stop()

Stop server

Jump to

Keyboard shortcuts

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