ws

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 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 Conn

type Conn struct {
	net.Conn
	// contains filtered or unexported fields
}

Conn impiments drpc conn

func (*Conn) LocalAddr

func (c *Conn) LocalAddr() drpcnet.Addr

LocalAddr returns the local network address

func (*Conn) ReadMsg

func (c *Conn) ReadMsg() ([]byte, error)

ReadMsg reads message from connection

func (*Conn) RemoteAddr

func (c *Conn) RemoteAddr() drpcnet.Addr

RemoteAddr returns the remote network address

func (*Conn) WriteMsg

func (c *Conn) WriteMsg(data []byte) error

WriteMsg writes message to connection

type Listener

type Listener struct {
	net.Listener
	WSUpgrader       ws.Upgrader
	CheckProxyHeader bool
}

Listener impiments drpc listener

func NewListener

func NewListener(addr string, tlsConf *tls.Config) (*Listener, error)

NewListener returns new WS DRPC listener tlsConf may be nil then it will be insecure listener

func (*Listener) Accept

func (l *Listener) Accept() (drpcnet.Conn, error)

Accept accepts new connection

func (*Listener) Close

func (l *Listener) Close() error

Close closes tcp listener

Jump to

Keyboard shortcuts

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