tcp

package
v0.0.0-...-33e1650 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageHandler

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

func (MessageHandler) HandleActive

func (h MessageHandler) HandleActive(ctx netty.ActiveContext)

func (MessageHandler) HandleException

func (h MessageHandler) HandleException(ctx netty.ExceptionContext, ex netty.Exception)

func (MessageHandler) HandleInactive

func (h MessageHandler) HandleInactive(ctx netty.InactiveContext, ex netty.Exception)

func (MessageHandler) HandleRead

func (h MessageHandler) HandleRead(ctx netty.InboundContext, message netty.Message)

type Server

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

Server is an TCP server wrapper.

func NewServer

func NewServer(ctx *transport.Context, codec []codec.Codec, codec2 vulcanus.Codec, handler vulcanus.DataHandler, opts ...ServerOption) *Server

NewServer creates a TCP server by options.

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start start the TCP server.

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Stop stop the TCP server.

type ServerOption

type ServerOption func(*Server)

func Port

func Port(port uint32) ServerOption

Port with server port.

Jump to

Keyboard shortcuts

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