server

package
v0.0.0-...-703b195 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnectionAttachment

func NewConnectionAttachment(conn *Connection) topic.Attachment

Types

type Connection

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

Connection represents an application level connection to the client.

func NewConnection

func NewConnection(
	conn utils.NetworkConnection,
	broker *topic.Broker,
	logger *zap.Logger,
) *Connection

func (*Connection) Close

func (c *Connection) Close() error

func (*Connection) Recv

func (c *Connection) Recv() error

Recv reads from the network connection and handles the request.

func (*Connection) SendDataMessage

func (c *Connection) SendDataMessage(m topic.Message)

type ConnectionAttachment

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

ConnectionAttachment implements a topic attachment to send messages to the connection.

func (*ConnectionAttachment) Send

type Server

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

func NewServer

func NewServer(broker *topic.Broker, logger *zap.Logger) *Server

func (*Server) Serve

func (s *Server) Serve(lis net.Listener) error

Jump to

Keyboard shortcuts

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