client

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT 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 {
	IP        string
	Nick      string
	SessionID string
	// contains filtered or unexported fields
}

func New

func New(conn *websocket.Conn) *Client

func (*Client) Close

func (c *Client) Close() error

Close closes the websocket connection

func (*Client) DirectSend added in v0.0.9

func (c *Client) DirectSend(prefix byte, p []byte) (n int, err error)

DirectSend sends a message to the client without using the stream

func (*Client) Read

func (c *Client) Read(p []byte) (n int, err error)

Read reads from the stream

func (*Client) ReadFromWS

func (c *Client) ReadFromWS(p []byte) (n int, err error)

ReadFromWS reads from the websocket

func (*Client) ReadLoop added in v0.0.16

func (c *Client) ReadLoop(ptmx *os.File)

func (*Client) Send

func (c *Client) Send(prefix byte, p []byte) (n int, err error)

Send sends a message to the client using the stream

func (*Client) Write

func (c *Client) Write(p []byte) (n int, err error)

Write writes to the stream

func (*Client) WriteLoop

func (c *Client) WriteLoop()

WriteLoop writes to the websocket

Jump to

Keyboard shortcuts

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