Documentation ¶
Index ¶
- func Dial(destination, name string) (transport.Conn, error)
- func DialWithLocalBinding(destination, name string, localBinding string) (transport.Conn, error)
- func Listen(bindAddress string, name string, acceptF func(transport.Conn), ...) (io.Closer, error)
- type AddressParser
- type Connection
- func (c *Connection) Close() error
- func (self *Connection) Detail() *transport.ConnectionDetail
- func (c *Connection) LocalAddr() net.Addr
- func (self *Connection) PeerCertificates() []*x509.Certificate
- func (c *Connection) Read(p []byte) (n int, err error)
- func (c *Connection) RemoteAddr() net.Addr
- func (c *Connection) SetDeadline(t time.Time) error
- func (c *Connection) SetReadDeadline(t time.Time) error
- func (c *Connection) SetWriteDeadline(t time.Time) error
- func (c *Connection) Write(p []byte) (n int, err error)
- type WSSConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialWithLocalBinding ¶
Dial is unsupported for ws transport
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 (self *Connection) Detail() *transport.ConnectionDetail
func (*Connection) LocalAddr ¶
func (c *Connection) LocalAddr() net.Addr
func (*Connection) PeerCertificates ¶
func (self *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
type WSSConfig ¶
type WSSConfig struct {
// contains filtered or unexported fields
}
func NewDefaultWSSConfig ¶
func NewDefaultWSSConfig() *WSSConfig
Click to show internal directories.
Click to hide internal directories.