Documentation
¶
Index ¶
- type Config
- type GorillaConnection
- func (c *GorillaConnection) Close() error
- func (c *GorillaConnection) ReadMessage() (int, []byte, error)
- func (c *GorillaConnection) RemoteAddr() string
- func (c *GorillaConnection) SetCloseHandler(h func(code int, text string) error)
- func (c *GorillaConnection) SetPongHandler(h func(appData string) error)
- func (c *GorillaConnection) SetReadDeadline(t time.Time) error
- func (c *GorillaConnection) SetReadLimit(limit int64)
- func (c *GorillaConnection) SetWriteDeadline(t time.Time) error
- func (c *GorillaConnection) WriteMessage(messageType int, data []byte) error
- type GorillaUpgrader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GorillaConnection ¶
type GorillaConnection struct {
// contains filtered or unexported fields
}
func (*GorillaConnection) Close ¶
func (c *GorillaConnection) Close() error
func (*GorillaConnection) ReadMessage ¶
func (c *GorillaConnection) ReadMessage() (int, []byte, error)
func (*GorillaConnection) RemoteAddr ¶
func (c *GorillaConnection) RemoteAddr() string
func (*GorillaConnection) SetCloseHandler ¶
func (c *GorillaConnection) SetCloseHandler(h func(code int, text string) error)
SetCloseHandler sets the handler for close messages received from the peer.
func (*GorillaConnection) SetPongHandler ¶
func (c *GorillaConnection) SetPongHandler(h func(appData string) error)
SetPongHandler sets the handler for pong messages received from the peer.
func (*GorillaConnection) SetReadDeadline ¶
func (c *GorillaConnection) SetReadDeadline(t time.Time) error
SetReadDeadline sets the read deadline on the underlying connection.
func (*GorillaConnection) SetReadLimit ¶
func (c *GorillaConnection) SetReadLimit(limit int64)
SetReadLimit sets the maximum size for a message read from the peer.
func (*GorillaConnection) SetWriteDeadline ¶
func (c *GorillaConnection) SetWriteDeadline(t time.Time) error
SetWriteDeadline sets the write deadline on the underlying connection.
func (*GorillaConnection) WriteMessage ¶
func (c *GorillaConnection) WriteMessage(messageType int, data []byte) error
type GorillaUpgrader ¶
type GorillaUpgrader struct {
// contains filtered or unexported fields
}
func NewGorillaUpgrader ¶
func NewGorillaUpgrader(cfg Config, checkOrigin func(r *http.Request) bool) *GorillaUpgrader
func (*GorillaUpgrader) Upgrade ¶
func (u *GorillaUpgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (*GorillaConnection, error)
Click to show internal directories.
Click to hide internal directories.