tcp

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(conn net.Conn, service ports.DataService, tokenService ports.TokenService) *Client

func (*Client) Close

func (c *Client) Close()

func (*Client) HandleMessage

func (c *Client) HandleMessage(message string)

func (*Client) IsClosed

func (c *Client) IsClosed() bool

func (*Client) ReadLoop

func (c *Client) ReadLoop()

func (*Client) Run

func (c *Client) Run()

func (*Client) SendMessage

func (c *Client) SendMessage(message string) error

type Server

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

func NewServer

func NewServer(addr string, cfg *tls.Config) (*Server, error)

func (*Server) AddClient

func (s *Server) AddClient(client *Client)

func (*Server) AddHandler

func (s *Server) AddHandler(dataService ports.DataService, tokenService ports.TokenService)

func (*Server) Close added in v0.1.4

func (s *Server) Close() error

func (*Server) CloseAllClients

func (s *Server) CloseAllClients()

func (*Server) RemoveClient

func (s *Server) RemoveClient(client *Client)

func (*Server) Run

func (s *Server) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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