Documentation ¶
Overview ¶
Package websocket implements a websocket based transport for go-libp2p. Deprecated: This package has moved into go-libp2p as a sub-package: github.com/libp2p/go-libp2p/p2p/transport/websocket.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var GracefulCloseTimeout = websocket.GracefulCloseTimeout
GracefulCloseTimeout is the time to wait trying to gracefully close a connection before simply cutting it. Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/websocket.GracefulCloseTimeout instead.
var WsFmt = websocket.WsFmt
WsFmt is multiaddr formatter for WsProtocol Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/websocket.WsFmt instead.
Functions ¶
Types ¶
type Addr ¶
Addr is an implementation of net.Addr for WebSocket. Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/websocket.Addr instead.
func NewAddr ¶
NewAddr creates an Addr with `ws` scheme (insecure).
Deprecated. Use NewAddrWithScheme.
func NewAddrWithScheme ¶ added in v0.7.0
NewAddrWithScheme creates a new Addr using the given host string. isSecure should be true for WSS connections and false for WS. Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/websocket.NewAddrWithScheme instead.
type Conn ¶
Conn implements net.Conn interface for gorilla/websocket. Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/websocket.Conn instead.
type Option
deprecated
added in
v0.7.0
Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/websocket.Option instead.
func WithTLSClientConfig ¶ added in v0.7.0
WithTLSClientConfig sets a TLS client configuration on the WebSocket Dialer. Only relevant for non-browser usages.
Some useful use cases include setting InsecureSkipVerify to `true`, or setting user-defined trusted CA certificates. Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/websocket.WithTLSClientConfig instead.
func WithTLSConfig ¶ added in v0.7.0
WithTLSConfig sets a TLS configuration for the WebSocket listener. Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/websocket.WithTLSConfig instead.
type WebsocketTransport ¶
type WebsocketTransport = websocket.WebsocketTransport
WebsocketTransport is the actual go-libp2p transport Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/websocket.WebsocketTransport instead.
func New
deprecated
func New(u transport.Upgrader, rcmgr network.ResourceManager, opts ...Option) (*WebsocketTransport, error)
Deprecated: use github.com/libp2p/go-libp2p/p2p/transport/websocket.New instead.