server

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler func(conn net.Conn, packet *roc.Packet, server *TcpServer)

func NewTcpServerHandler

func NewTcpServerHandler(callback JsonRPCHandler) Handler

type JsonRPCHandler

type JsonRPCHandler func(route *formatter.JsonRPCRoute, packet *roc.Packet, server *TcpServer) (any, exception.ExceptionInterface)

type TcpServer

type TcpServer struct {
	Address    string
	Handler    Handler
	Packer     roc.PackerInterface
	Serializer serializer.SerializerInterface
}

func NewTcpServer

func NewTcpServer(addr string, handler Handler) *TcpServer

func (*TcpServer) Start

func (s *TcpServer) Start()

Jump to

Keyboard shortcuts

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