websocket

package
v0.0.0-...-a727419 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*fastws.Conn
	P         [32]byte
	Nonce     [12]byte
	HashKey   [32]byte
	SessionID string
}

func NewClient

func NewClient(port string) (*Client, error)

func (*Client) ClientHello

func (c *Client) ClientHello() (*string, error)

ClientHello preforms a DHE. The private key is encoded in base64 and is 256 bits long (Before encoding)

func (*Client) RecvHello

func (c *Client) RecvHello(validate func([]byte) (string, error)) (*string, error)

func (*Client) RetrieveSession

func (c *Client) RetrieveSession() (*string, error)

RetrieveSession retrieves the session ID provided by the server The session ID is vital for all future requests

func (*Client) SendHello

func (c *Client) SendHello(pub []byte, nonce [12]byte) error

Jump to

Keyboard shortcuts

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