wss

package
v2.0.83 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 21 Imported by: 4

Documentation

Index

Constants

View Source
const Type = "wss"

Variables

This section is empty.

Functions

func Listen

func Listen(bindAddress, name string, i *identity.TokenId, acceptF func(transport.Conn), transportConfig transport.Configuration) (io.Closer, error)

Types

type AddressParser

type AddressParser struct{}

func (AddressParser) Parse

func (ap AddressParser) Parse(s string) (transport.Address, error)

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

Connection wraps gorilla websocket to provide io.ReadWriteCloser

func (*Connection) Close

func (c *Connection) Close() error

Close implements io.Closer and closes the underlying connection.

func (*Connection) Detail

func (c *Connection) Detail() *transport.ConnectionDetail

func (*Connection) LocalAddr

func (c *Connection) LocalAddr() net.Addr

func (*Connection) PeerCertificates

func (c *Connection) PeerCertificates() []*x509.Certificate

func (*Connection) Read

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

Read implements io.Reader by wrapping websocket messages in a buffer.

func (*Connection) RemoteAddr

func (c *Connection) RemoteAddr() net.Addr

func (*Connection) SetDeadline

func (c *Connection) SetDeadline(t time.Time) error

func (*Connection) SetReadDeadline

func (c *Connection) SetReadDeadline(t time.Time) error

func (*Connection) SetWriteDeadline

func (c *Connection) SetWriteDeadline(t time.Time) error

func (*Connection) Write

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

Write implements io.Writer and sends binary messages only.

Jump to

Keyboard shortcuts

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