service

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const HandshakeTimeLimit = 5 * time.Second

Variables

View Source
var ProviderSet = wire.NewSet(NewTCPService)

Functions

This section is empty.

Types

type Service

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

func NewTCPService

func NewTCPService(logger log.Logger, label *conf.Label,
	gateRT *router.RouteTable,
	playerRT *player.RouteTable, playerClient playerv1.TunnelServiceClient,
	roomRT *room.RouteTable, roomClient roomv1.TunnelServiceClient,
) *Service

func (*Service) Auth

func (s *Service) Auth(ctx context.Context, in xnet.Pack) (out xnet.Pack, session xnet.Session, err error)

func (*Service) CreateAppTunnel added in v0.0.4

func (s *Service) CreateAppTunnel(ctx context.Context, ss xnet.Session, tp int32, oid int64, worker xnet.Worker) (xnet.AppTunnel, error)

func (*Service) Handle

func (s *Service) Handle(ctx context.Context, ss xnet.Session, th xnet.TunnelManager, in xnet.Pack) (err error)

func (*Service) OnConnected

func (s *Service) OnConnected(ctx context.Context, ss xnet.Session) (err error)

func (*Service) OnDisconnect

func (s *Service) OnDisconnect(ctx context.Context, ss xnet.Session) (err error)

func (*Service) Tick added in v0.0.2

func (s *Service) Tick(ctx context.Context, ss xnet.Session) (err error)

func (*Service) TunnelType

func (s *Service) TunnelType(mod int32) (t int32, initCapacity int, err error)

TunnelType returns the tunnel type based on the module ID most modules have the specific tunnel type, except for the player module

Jump to

Keyboard shortcuts

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