Documentation
¶
Index ¶
Constants ¶
View Source
const HttpVersion = "1.1"
Constant
View Source
const WSVersion = 13
Variables ¶
View Source
var WSSalt []byte = []byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11")
Functions ¶
This section is empty.
Types ¶
type StatusCode ¶
type StatusCode uint16
StatusCode maps the status codes (and description)
var BAD_REQUEST StatusCode = 400 // missing/malformed headers
var FORBIDDEN StatusCode = 403 // invalid origin policy, TLS required
var INTERNAL StatusCode = 500 // custom error
var NOT_FOUND StatusCode = 404 // unserved or invalid URI
var SWITCHING_PROTOCOLS StatusCode = 101 // handshake success
var UPGRADE_REQUIRED StatusCode = 426 // invalid WS version
func (StatusCode) Message ¶
func (sc StatusCode) Message() string
type T ¶
type T struct {
// contains filtered or unexported fields
}
T represents an HTTP Upgrade Response
func (T) GetProtocol ¶
GetProtocol returns the choosen protocol if set, else nil
func (T) GetStatusCode ¶
func (r T) GetStatusCode() StatusCode
GetStatusCode returns the response status code
func (*T) ProcessKey ¶
ProcessKey processes the accept token according to the rfc from the Sec-WebSocket-Key
func (*T) SetStatusCode ¶
func (r *T) SetStatusCode(sc StatusCode)
SetStatusCode sets the status code
Click to show internal directories.
Click to hide internal directories.