internal

package
v0.0.0-...-e643149 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServiceRegChan = make(chan *Service)
	StreamRegChan  = make(chan *Stream, 1) // Sent from synchronous callbacks.

)
View Source
var InstanceSocket string

InstanceSocket can be set via linker flag during build process. GATE_INSTANCE_SOCKET environment variable will override it. If neither is set, the socket location is guessed.

Functions

func Init

func Init()

Init must be called only by service.Register with mutex held.

func SendPacket

func SendPacket(p packet.Buf, receptor func([]byte))

Types

type Service

type Service struct {
	// Public fields are initialized by service.Register.
	Name         string
	Code         packet.Code
	InfoReceptor func([]byte)
	// contains filtered or unexported fields
}

type Stream

type Stream struct {
	// Fields are initialized by service.NewStream.
	Service *Service
	ID      int32
}

func (*Stream) Close

func (st *Stream) Close() error

func (*Stream) Read

func (st *Stream) Read(b []byte) (int, error)

func (*Stream) Write

func (st *Stream) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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