Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type P2PServer ¶
type P2PServer struct {
// contains filtered or unexported fields
}
func NewP2PServer ¶
func NewP2PServer(wsHandler func(ws *WebSocketConn, request *http.Request)) *P2PServer
func (*P2PServer) Bind ¶
func (server *P2PServer) Bind(conf P2PServerConfig)
type P2PServerConfig ¶
type P2PServerConfig struct { Host string Port int CertFile string KeyFile string HTMLRoot string WebSocketPath string }
func DefaultConfig ¶
func DefaultConfig() P2PServerConfig
type WebSocketConn ¶
func NewWebSocketConn ¶
func NewWebSocketConn(socket *websocket.Conn) *WebSocketConn
func (*WebSocketConn) Close ¶
func (conn *WebSocketConn) Close()
func (*WebSocketConn) ReadMessage ¶
func (conn *WebSocketConn) ReadMessage()
func (*WebSocketConn) Send ¶
func (conn *WebSocketConn) Send(message string) error
Click to show internal directories.
Click to hide internal directories.