conn

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	ID string

	In   chan []byte
	Exit chan interface{}
	// contains filtered or unexported fields
}

Websocket connection wrapper to handle JsonRpc communication

func NewConn

func NewConn(c net.Conn) *Conn

func (*Conn) Close

func (c *Conn) Close()

Closes connection and its channels

func (*Conn) GoRead

func (c *Conn) GoRead()

gorutine for reading messages from connection

func (*Conn) Ping

func (c *Conn) Ping()

Sends ping message to the connection

func (*Conn) Send

func (c *Conn) Send(msg []byte) error

writes data to the connection

Jump to

Keyboard shortcuts

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