Documentation ¶
Index ¶
Constants ¶
Variables ¶
View Source
var ( ErrorBinaryMessage = errors.New("Binary messages are not supported") ErrorBadBuffer = errors.New("Buffer error") ErrorPacketWrong = errors.New("Wrong packet type error") ErrorMethodNotAllowed = errors.New("Method not allowed") ErrorHttpUpgradeFailed = errors.New("Http upgrade failed") )
Functions ¶
This section is empty.
Types ¶
type WebsocketConnection ¶
type WebsocketConnection struct {
// contains filtered or unexported fields
}
func (*WebsocketConnection) Close ¶
func (wsc *WebsocketConnection) Close()
func (*WebsocketConnection) GetMessage ¶
func (wsc *WebsocketConnection) GetMessage() (message string, err error)
func (*WebsocketConnection) PingParams ¶
func (wsc *WebsocketConnection) PingParams() (interval, timeout time.Duration)
func (*WebsocketConnection) WriteMessage ¶
func (wsc *WebsocketConnection) WriteMessage(message string) error
type WebsocketTransport ¶
type WebsocketTransport struct { PingInterval time.Duration PingTimeout time.Duration ReceiveTimeout time.Duration SendTimeout time.Duration BufferSize int RequestHeader http.Header // contains filtered or unexported fields }
func GetDefaultWebsocketTransport ¶
func GetDefaultWebsocketTransport(proxyDialer proxy.Dialer) *WebsocketTransport
* Returns websocket connection with default params
func (*WebsocketTransport) Connect ¶
func (wst *WebsocketTransport) Connect(url string) (conn tp.Connection, err error)
func (*WebsocketTransport) HandleConnection ¶
func (wst *WebsocketTransport) HandleConnection( w http.ResponseWriter, r *http.Request) (conn tp.Connection, err error)
func (*WebsocketTransport) Serve ¶
func (wst *WebsocketTransport) Serve(w http.ResponseWriter, r *http.Request)
* Websocket connection do not require any additional processing
Click to show internal directories.
Click to hide internal directories.