websocket

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AckChan = make(chan AckInfo)

Functions

func AckHandler

func AckHandler(ch <-chan AckInfo)

func Pinger

func Pinger(c chan connection.Conn, size int, PingInterval time.Duration, WriteWaitInterval time.Duration)

Pinger is worker that pings the connected peers based on ping interval.

Types

type AckInfo

type AckInfo struct {
	MessageType int
	RequestGuid string
	Err         error
	Conn        connection.Conn

	TimeConsumed    time.Time
	AckTimeConsumed time.Time
	// contains filtered or unexported fields
}

type Handler

type Handler struct {
	PingChannel chan connection.Conn
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(pingC chan connection.Conn, collector collection.Collector) *Handler

func (*Handler) Ack

func (h *Handler) Ack(conn connection.Conn, resChannel chan AckInfo, s serialization.SerializeFunc, messageType int, reqGuid string, timeConsumed time.Time) collection.AckFunc

func (*Handler) HandlerWSEvents

func (h *Handler) HandlerWSEvents(w http.ResponseWriter, r *http.Request)

HandlerWSEvents handles the upgrade and the events sent by the peers

func (*Handler) Table

func (h *Handler) Table() *connection.Table

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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