Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
Wrap an HTTP2 connection over WebSockets and use the underlying WebSocket framing for proxy compatibility.
Example ¶
Connect to the Websocket endpoint at ws://localhost using SPDY over Websockets framing.
wsconn, _, _ := websocket.DefaultDialer.Dial("ws://localhost/", http.Header{"Origin": {"http://localhost/"}}) conn, _ := spdystream.NewConnection(NewConnection(wsconn), false) go conn.Serve(spdystream.NoOpStreamHandler, spdystream.NoAuthHandler) stream, _ := conn.CreateStream(http.Header{}, nil, false) stream.Wait()
Output:
func NewConnection ¶
Click to show internal directories.
Click to hide internal directories.