net

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Networking

type Networking struct {
	HandshakeChan chan *SuccessfulHandshakeData
	// contains filtered or unexported fields
}

func NewNetworking

func NewNetworking(cfg *config.Config) *Networking

func (*Networking) HandShake

func (n *Networking) HandShake(w http.ResponseWriter, r *http.Request)

func (*Networking) ListenAndServe

func (n *Networking) ListenAndServe(address, port string) error

func (*Networking) PreHandShake

func (n *Networking) PreHandShake(response http.ResponseWriter, request *http.Request) (
	*websocket.Conn, *jwt.MapClaims, bool, *api.Handshake,
)

PreHandShake TODO: it's "god" method needs to be simplified // antst: agree :)

type SuccessfulHandshakeData

type SuccessfulHandshakeData struct {
	Connection *socket.Connection
	UserID     uuid.UUID
	SessionID  uuid.UUID
	URL        *url.URL
}

Jump to

Keyboard shortcuts

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