MCPcopy Create free account

hub / github.com/gorilla/websocket / functions

Functions256 in github.com/gorilla/websocket

↓ 22 callersMethodClose
()
client_server_test.go:369
↓ 21 callersMethodDial
Dial connects to the given address via the proxy.
x_net_proxy.go:163
↓ 21 callersFunctionnewTestConn
newTestConn creates a connnection backed by a fake network connection using default values for buffering.
conn_test.go:53
↓ 20 callersMethodWriteMessage
WriteMessage is a helper method for getting a writer using NextWriter, writing the message and closing the writer.
conn.go:758
↓ 19 callersMethodClose
Close closes the underlying network connection without sending or waiting for a close message.
conn.go:344
↓ 16 callersMethodError
()
conn.go:100
↓ 16 callersMethodNextWriter
NextWriter returns a writer for the next message to send. The writer's Close method flushes the complete message to the network. There can be at most
conn.go:518
↓ 14 callersMethodString
()
conn_test.go:47
↓ 13 callersFunctionnewServer
(t *testing.T)
client_server_test.go:62
↓ 12 callersMethodGet
Get gets a value from the pool or returns nil if the pool is empty.
conn.go:231
↓ 12 callersMethodNextReader
NextReader returns the next data message received from the peer. The returned messageType is either TextMessage or BinaryMessage. There can be at mos
conn.go:998
↓ 12 callersMethodUpgrade
Upgrade upgrades the HTTP server connection to the WebSocket protocol. The responseHeader is included in the response to the client's upgrade request
server.go:125
↓ 11 callersMethodReadMessage
ReadMessage is a helper method for getting a reader using NextReader and reading from that reader to a buffer.
conn.go:1091
↓ 11 callersFunctionnewConn
(conn net.Conn, isServer bool, readBufferSize, writeBufferSize int, writeBufferPool BufferPool, br *bufio.Read
conn.go:285
↓ 10 callersMethodWriteControl
WriteControl writes a control message with the given deadline. The allowed message types are CloseMessage, PingMessage and PongMessage.
conn.go:413
↓ 10 callersFunctionsendRecv
(t *testing.T, ws *Conn)
client_server_test.go:131
↓ 9 callersMethodClose
()
conn_test.go:29
↓ 9 callersFunctionFormatCloseMessage
FormatCloseMessage formats closeCode and text as a WebSocket close message. An empty message is returned for code CloseNoStatusReceived.
conn.go:1219
↓ 8 callersMethodWrite
(p []byte)
server.go:348
↓ 7 callersMethodWrite
(p []byte)
conn_test.go:305
↓ 6 callersMethodSetWriteDeadline
SetWriteDeadline sets the write deadline on the underlying network connection. After a write has timed out, the websocket state is corrupt and all fut
conn.go:787
↓ 6 callersMethodWriteString
(p string)
conn.go:684
↓ 5 callersMethodSetPongHandler
SetPongHandler sets the handler for pong messages received from the peer. The appData argument to h is the PONG message application data. The default
conn.go:1185
↓ 5 callersMethodflushFrame
flushFrame writes buffered data and extra as a frame to the network. The final argument indicates that this is the last frame in the message.
conn.go:556
↓ 5 callersFunctionmaskBytes
(key [4]byte, pos int, b []byte)
mask.go:14
↓ 5 callersFunctionrootCAs
(t *testing.T, s *httptest.Server)
client_server_test.go:289
↓ 4 callersMethodDialContext
DialContext creates a new client connection. Use requestHeader to specify the origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies (Cook
client.go:159
↓ 4 callersFunctionIsUnexpectedCloseError
IsUnexpectedCloseError returns boolean indicating whether the error is a *CloseError with a code not in the list of expected codes.
conn.go:164
↓ 4 callersMethodSetReadLimit
SetReadLimit sets the maximum size in bytes for a message read from the peer. If a message exceeds the limit, the connection sends a close message to
conn.go:1112
↓ 4 callersFunctionmakeWsProto
(s string)
client_server_test.go:127
↓ 4 callersFunctiontokenListContainsValue
tokenListContainsValue returns true if the 1#token header with the given name contains a token equal to value with ASCII case folding.
util.go:202
↓ 3 callersMethodDial
Dial creates a new client connection by calling DialContext with a background context.
client.go:115
↓ 3 callersFunctionIsWebSocketUpgrade
IsWebSocketUpgrade returns true if the client requested upgrade to the WebSocket protocol.
server.go:325
↓ 3 callersFunctionNewPreparedMessage
NewPreparedMessage returns an initialized PreparedMessage. You can then send it to connection using WritePreparedMessage method. Valid wire representa
prepared.go:43
↓ 3 callersMethodPut
Put adds a value to the pool.
conn.go:233
↓ 3 callersMethodReadJSON
ReadJSON reads the next JSON-encoded message from the connection and stores it in the value pointed to by v. See the documentation for the encoding/j
json.go:49
↓ 3 callersMethodSetDeadline
(t time.Time)
client_server_test.go:339
↓ 3 callersMethodSetReadDeadline
SetReadDeadline sets the read deadline on the underlying network connection. After a read has timed out, the websocket connection state is corrupt and
conn.go:1105
↓ 3 callersFunctionSubprotocols
Subprotocols returns the subprotocols requested by the client in the Sec-Websocket-Protocol header.
server.go:311
↓ 3 callersMethodWrite
(p []byte)
conn.go:657
↓ 3 callersMethodWritePreparedMessage
WritePreparedMessage writes prepared message into connection.
conn.go:735
↓ 3 callersFunctioncomputeAcceptKey
(challengeKey string)
util.go:19
↓ 3 callersFunctionechoReadAll
echoReadAll echoes messages from the client by reading the entire message with ioutil.ReadAll.
examples/autobahn/server.go:88
↓ 3 callersFunctionequalASCIIFold
equalASCIIFold returns true if s is equal to t with ASCII case folding as defined in RFC 4790.
util.go:178
↓ 3 callersFunctionhideTempErr
(err error)
conn.go:189
↓ 3 callersFunctionhostPortNoPort
(u *url.URL)
client.go:121
↓ 3 callersFunctionisControl
(frameType int)
conn.go:196
↓ 3 callersFunctionisData
(frameType int)
conn.go:200
↓ 3 callersFunctionnewMaskKey
()
conn.go:184
↓ 3 callersFunctionnewTLSServer
(t *testing.T)
client_server_test.go:70
↓ 3 callersFunctionnextToken
nextToken returns the leading RFC 2616 token of s and the string following the token.
util.go:129
↓ 3 callersFunctionparseExtensions
parseExtensions parses WebSocket extensions from a header.
util.go:228
↓ 3 callersFunctiontextMessages
(num int)
compression_test.go:35
↓ 3 callersMethodwriteFatal
Write methods
conn.go:360
↓ 2 callersMethodClose
()
compression.go:140
↓ 2 callersMethodError
()
server.go:22
↓ 2 callersMethodServeHTTP
(w http.ResponseWriter, r *http.Request)
client_server_test.go:78
↓ 2 callersMethodSetCompressionLevel
SetCompressionLevel sets the flate compression level for subsequent text and binary messages. This function is a noop if compression was not negotiate
conn.go:1209
↓ 2 callersMethodSetDeadline
(t time.Time)
conn_test.go:32
↓ 2 callersMethodSubprotocol
Subprotocol returns the negotiated protocol for the connection.
conn.go:338
↓ 2 callersMethodTemporary
()
conn.go:101
↓ 2 callersMethodUnderlyingConn
UnderlyingConn returns the internal net.Conn. This can be used to further modifications to connection specific flags.
conn.go:1194
↓ 2 callersMethodWrite
(p []byte)
client_server_test.go:566
↓ 2 callersMethodWrite
(p []byte)
compression.go:64
↓ 2 callersMethodWriteJSON
WriteJSON writes the JSON encoding of v as a message. See the documentation for encoding/json Marshal for details about the conversion of Go values t
json.go:23
↓ 2 callersMethodadvanceFrame
Read methods
conn.go:794
↓ 2 callersMethodbeginMessage
beginMessage prepares a connection and message writer for a new message.
conn.go:475
↓ 2 callersFunctionbufioWriterBuffer
bufioWriterBuffer grabs the buffer from a bufio.Writer.
server.go:354
↓ 2 callersFunctionechoCopy
echoCopy echoes messages from the client using io.Copy.
examples/autobahn/server.go:30
↓ 2 callersMethodframe
(key prepareKey)
prepared.go:62
↓ 2 callersMethodncopy
(max int)
conn.go:643
↓ 2 callersFunctionproxy_FromURL
FromURL returns a Dialer given a URL specification and an underlying Dialer for it to make network requests.
x_net_proxy.go:214
↓ 2 callersFunctionreadFileIfModified
(lastMod time.Time)
examples/filewatch/main.go:44
↓ 2 callersMethodsetReadRemaining
setReadRemaining tracks the number of bytes remaining on the connection. If n overflows, an ErrReadLimit is returned.
conn.go:328
↓ 2 callersFunctionskipSpace
skipSpace returns a slice of the string s with all leading RFC 2616 linear whitespace removed.
util.go:117
↓ 2 callersMethodwrite
(frameType int, deadline time.Time, buf0, buf1 []byte)
conn.go:379
↓ 1 callersMethodAddFromString
AddFromString parses a string that contains comma-separated values specifying hosts that should use the bypass proxy. Each value is either an IP addre
x_net_proxy.go:100
↓ 1 callersMethodAddHost
AddHost specifies a host name that will use the bypass proxy.
x_net_proxy.go:153
↓ 1 callersMethodAddIP
AddIP specifies an IP address that will use the bypass proxy. Note that this will only take effect if a literal IP address is dialed. A connection to
x_net_proxy.go:129
↓ 1 callersMethodAddNetwork
AddNetwork specifies an IP range that will use the bypass proxy. Note that this will only take effect if a literal IP address is dialed. A connection
x_net_proxy.go:136
↓ 1 callersMethodAddZone
AddZone specifies a DNS suffix that will use the bypass proxy. A zone of "example.com" matches "example.com" and all of its subdomains.
x_net_proxy.go:142
↓ 1 callersMethodHijack
()
server_test.go:80
↓ 1 callersFunctionIsCloseError
IsCloseError returns boolean indicating whether the error is a *CloseError with one of the specified codes.
conn.go:151
↓ 1 callersFunctionJoinMessages
JoinMessages concatenates received messages to create a single io.Reader. The string term is appended to each message. The returned reader does not su
join.go:15
↓ 1 callersMethodLocalAddr
()
conn_test.go:30
↓ 1 callersMethodRead
(p []byte)
conn_test.go:679
↓ 1 callersMethodRead
(b []byte)
conn.go:1038
↓ 1 callersFunctionReadJSON
ReadJSON reads the next JSON-encoded message from the connection and stores it in the value pointed to by v. Deprecated: Use c.ReadJSON instead.
json.go:40
↓ 1 callersMethodRemoteAddr
()
conn_test.go:31
↓ 1 callersMethodSetCloseHandler
SetCloseHandler sets the handler for close messages received from the peer. The code argument to h is the received close code or CloseNoStatusReceived
conn.go:1135
↓ 1 callersMethodSetPingHandler
SetPingHandler sets the handler for ping messages received from the peer. The appData argument to h is the PING message application data. The default
conn.go:1158
↓ 1 callersMethodSetReadDeadline
(t time.Time)
client_server_test.go:345
↓ 1 callersMethodSetWriteDeadline
(t time.Time)
client_server_test.go:350
↓ 1 callersMethodTimeout
()
conn.go:102
↓ 1 callersFunctionWriteJSON
WriteJSON writes the JSON encoding of v as a message. Deprecated: Use c.WriteJSON instead.
json.go:15
↓ 1 callersMethodbroadcastOnce
(msg *broadcastMessage)
conn_broadcast_test.go:94
↓ 1 callersFunctionbufioReaderSize
bufioReaderSize size returns the size of a bufio.Reader.
server.go:331
↓ 1 callersFunctioncheckSameOrigin
checkSameOrigin returns true if the origin is not set or is equal to the request host.
server.go:89
↓ 1 callersFunctioncloneTLSConfig
(cfg *tls.Config)
client.go:417
↓ 1 callersMethodclose
()
conn_broadcast_test.go:90
next →1–100 of 256, ranked by callers