You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

13 lines
254 B

package wsutil
import (
"context"
"net"
"nhooyr.io/websocket"
)
// NetConn creates opaque wrapper net.Conn for websocket.Conn.
func NetConn(c *websocket.Conn) net.Conn {
return websocket.NetConn(context.Background(), c, websocket.MessageBinary)
}