MCPcopy Create free account

hub / github.com/Allenxuxu/gev / functions

Functions368 in github.com/Allenxuxu/gev

↓ 45 callersMethodGet
(key string)
context.go:27
↓ 34 callersMethodWriteString
(s string)
plugins/websocket/ws/http.go:341
↓ 29 callersMethodClose
()
eventloop/eventloop.go:23
↓ 29 callersMethodWrite
(p []byte)
plugins/websocket/ws/http.go:347
↓ 27 callersFunctionError
Error provides warn level logging
log/log.go:118
↓ 23 callersMethodSet
(key string, value interface{})
context.go:11
↓ 22 callersFunctionAddress
Address server 监听地址
options.go:69
↓ 20 callersFunctionNewServer
NewServer 创建 Server
server.go:36
↓ 19 callersFunctionNumLoops
NumLoops work eventloop 的数量
options.go:76
↓ 17 callersFunctionNetwork
Network [tcp] 暂时只支持tcp
options.go:62
↓ 15 callersFunctionInfo
Info provides info level logging
log/log.go:108
↓ 15 callersMethodSend
Send 用来在非 loop 协程发送
server_std.go:237
↓ 13 callersMethodPeerAddr
PeerAddr 获取客户端地址信息
server_std.go:227
↓ 12 callersMethodStop
Stop 关闭 Server
server.go:109
↓ 12 callersMethodSwap
(i, j int)
benchmark_load_balance_test.go:13
↓ 11 callersMethodStart
Start 启动 Server
server.go:94
↓ 10 callersFunctionRejectConnectionError
RejectConnectionError constructs an error that could be used to control the way handshake is rejected by Upgrader.
plugins/websocket/ws/errors.go:111
↓ 10 callersFunctionRejectionReason
RejectionReason returns an option that makes connection to be rejected with given reason.
plugins/websocket/ws/errors.go:87
↓ 10 callersFunctionRejectionStatus
RejectionStatus returns an option that makes connection to be rejected with given HTTP status code.
plugins/websocket/ws/errors.go:95
↓ 9 callersFunctionReusePort
ReusePort 设置 SO_REUSEPORT
options.go:55
↓ 9 callersMethodStart
Start server
example/pushmessage/main.go:36
↓ 9 callersFunctionerrorText
errorText is a non-performant error text generator. NOTE: Used only to generate constants.
plugins/websocket/ws/http.go:282
↓ 8 callersMethodError
Error implements error interface.
plugins/websocket/ws/errors.go:13
↓ 7 callersFunctionFrameToBytes
FrameToBytes return bytes
plugins/websocket/ws/frame.go:274
↓ 7 callersMethodString
()
example/protobuf/proto/user.pb.go:46
↓ 6 callersMethodClose
Close 关闭连接
server_std.go:265
↓ 6 callersMethodConnectionCount
()
eventloop/eventloop.go:75
↓ 6 callersMethodhandleClose
(fd int)
connection.go:288
↓ 5 callersFunctionNewFrame
NewFrame creates frame with given operation code, flag of completeness and payload bytes.
plugins/websocket/ws/frame.go:196
↓ 5 callersMethodQueueInLoop
QueueInLoop 添加 func 到事件循环中执行
eventloop/eventloop.go:131
↓ 5 callersFunctionhandler
(conn net.Conn, startC chan interface{}, closeC chan interface{}, result, req chan int64)
benchmarks/client/main.go:56
↓ 4 callersFunctionCustomProtocol
CustomProtocol 数据包处理
options.go:83
↓ 4 callersMethodIn
In reports whether the code is defined in given range.
plugins/websocket/ws/frame.go:102
↓ 4 callersFunctionInfof
Infof provides info level logging
log/log.go:113
↓ 4 callersMethodLog
(v ...interface{})
log/log.go:12
↓ 4 callersFunctionNew
New 创建一个 EventLoop
eventloop/eventloop.go:50
↓ 4 callersFunctionPackCloseData
PackCloseData 封装 websocket close 数据包
plugins/websocket/ws/util/util.go:22
↓ 4 callersFunctionPackData
PackData 封装 websocket message 数据包
plugins/websocket/ws/util/util.go:10
↓ 4 callersMethodPacket
(c *Connection, data interface{})
protocol.go:12
↓ 4 callersMethodRunEvery
RunEvery 定时任务
server.go:76
↓ 4 callersMethodUnPacket
(c *Connection, buffer *ringbuffer.RingBuffer)
protocol.go:11
↓ 4 callersFunctionWithLevel
WithLevel logs with the level specified
log/log.go:82
↓ 4 callersFunctionWithLevelf
WithLevelf logs with the level specified
log/log.go:90
↓ 4 callersMethodkEvents
(old Event, new Event, fd int)
poller/kqueue.go:126
↓ 3 callersMethodDelete
(key string)
context.go:21
↓ 3 callersFunctionMetricsServer
(path, address string)
options.go:102
↓ 3 callersFunctionNewCloseFrame
NewCloseFrame creates close frame with given close body. Note that p is not copied. Note that p must have length of MaxControlFramePayloadSize bytes o
plugins/websocket/ws/frame.go:239
↓ 3 callersFunctionNewCloseFrameBody
NewCloseFrameBody encodes a closure code and a reason into a binary representation. It returns slice which is at most MaxControlFramePayloadSize byte
plugins/websocket/ws/frame.go:251
↓ 3 callersFunctionNewWebSocketServer
NewWebSocketServer 创建 WebSocket Server
example/websocket/wsserver.go:10
↓ 3 callersFunctionRoundRobin
()
load_balance.go:7
↓ 3 callersMethodStop
Stop server
example/pushmessage/main.go:42
↓ 3 callersFunctionfile_proto_user_proto_rawDescGZIP
()
example/protobuf/proto/user.pb.go:215
↓ 3 callersFunctionhttpWriteHeaderKey
(bw *bufio.Writer, key string)
plugins/websocket/ws/http.go:169
↓ 3 callersMethodmod
(fd int, events uint32)
poller/epoll.go:111
↓ 3 callersFunctionstatusText
statusText is a non-performant status text generator. NOTE: Used only to generate constants.
plugins/websocket/ws/http.go:272
↓ 2 callersMethodAddSocketAndEnableRead
AddSocketAndEnableRead 增加 Socket 到事件循环中,并注册可读事件
eventloop/eventloop.go:89
↓ 2 callersFunctionCreate
Create 创建Poller
poller/epoll.go:26
↓ 2 callersFunctionIdleTime
IdleTime 最大空闲时间(秒)
options.go:90
↓ 2 callersFunctionLeastConnection
()
load_balance.go:16
↓ 2 callersFunctionLoadBalance
(strategy LoadBalanceStrategy)
options.go:96
↓ 2 callersFunctionNew
New 创建 websocket Protocol
plugins/websocket/protocol.go:22
↓ 2 callersFunctionNewBinaryFrame
NewBinaryFrame creates binary frame with p as payload. Note that p is not copied.
plugins/websocket/ws/frame.go:215
↓ 2 callersFunctionNewConnection
NewConnection 创建 Connection
server_std.go:177
↓ 2 callersFunctionNewHandlerWrap
NewHandlerWrap websocket handler wrap
plugins/websocket/wrap.go:25
↓ 2 callersFunctionNewTextFrame
NewTextFrame creates text frame with p as payload. Note that p is not copied.
plugins/websocket/ws/frame.go:209
↓ 2 callersMethodNext
(prev time.Time)
everyscheduler.go:9
↓ 2 callersMethodOnClose
(c *Connection)
connection.go:24
↓ 2 callersMethodOnConnect
(c *Connection)
server_std.go:25
↓ 2 callersMethodOnMessage
(c *Connection, ctx interface{}, data []byte)
connection.go:23
↓ 2 callersMethodOptions
Options 返回 options
server.go:128
↓ 2 callersFunctionPackMessage
PackMessage 按自定义协议打包数据
plugins/protobuf/protobuf.go:6
↓ 2 callersMethodPoll
Poll 启动 epoll wait 循环
poller/epoll.go:134
↓ 2 callersMethodReset
()
example/protobuf/proto/user.pb.go:37
↓ 2 callersFunctionSetLevel
SetLevel sets the log level
log/log.go:150
↓ 2 callersMethodShutdownWrite
ShutdownWrite 关闭可写端,等待读取完接收缓冲区所有数据
server_std.go:283
↓ 2 callersMethodUserBuffer
()
server_std.go:212
↓ 2 callersMethodWake
Wake 唤醒 epoll
poller/epoll.go:60
↓ 2 callersMethodWriteBufferLength
WriteBufferLength write buffer 当前积压的数据长度
server_std.go:293
↓ 2 callersFunctionWriteHeader
HeaderSize returns number of bytes that are needed to encode given header. It returns -1 if header is malformed. func HeaderSize(h *Header) (n int) {
plugins/websocket/ws/write.go:48
↓ 2 callersMethodadd
(fd int, events uint32)
poller/epoll.go:89
↓ 2 callersFunctionasciiToInt
asciiToInt converts bytes to int.
plugins/websocket/ws/util.go:9
↓ 2 callersFunctionbtrim
(bts []byte)
plugins/websocket/ws/util.go:50
↓ 2 callersMethodhandlerProtocol
(tmpBuffer *[]byte, buffer *ringbuffer.RingBuffer)
connection.go:208
↓ 2 callersFunctionmin
(a, b int)
plugins/websocket/ws/util.go:88
↓ 2 callersFunctionnewOptions
(opt ...Option)
options.go:25
↓ 2 callersMethodsendInLoop
(data []byte)
connection.go:305
↓ 2 callersFunctiontestData
()
benchmark_load_balance_test.go:27
↓ 2 callersFunctionwriteErrorText
(bw *bufio.Writer, err error)
plugins/websocket/ws/http.go:261
↓ 2 callersFunctionwriteStatusText
(bw *bufio.Writer, code int)
plugins/websocket/ws/http.go:251
↓ 1 callersMethodAddRead
AddRead 注册fd到epoll,并注册可读事件
poller/epoll.go:97
↓ 1 callersFunctionCheckCloseFrameData
CheckCloseFrameData checks received close information to be valid RFC6455 compatible close info. Note that code.Empty() or code.IsAppLevel() will rai
plugins/websocket/ws/util/util.go:65
↓ 1 callersFunctionCipher
Cipher applies XOR cipher to the payload using mask. Offset is used to cipher chunked data (e.g. in io.Reader implementations). To convert masked dat
plugins/websocket/ws/cipher.go:14
↓ 1 callersMethodClose
Close 关闭连接
connection.go:145
↓ 1 callersFunctionCreate
Create 创建Poller
poller/kqueue.go:24
↓ 1 callersMethodDel
Del 从epoll中删除fd
poller/epoll.go:107
↓ 1 callersMethodDeleteFdInLoop
DeleteFdInLoop 删除 fd
eventloop/eventloop.go:80
↓ 1 callersMethodEnableRead
EnableRead 修改fd注册事件为可读事件
poller/epoll.go:129
↓ 1 callersMethodEnableReadWrite
EnableReadWrite 修改fd注册事件为可读可写事件
poller/epoll.go:119
↓ 1 callersFunctionErrorf
Errorf provides warn level logging
log/log.go:123
↓ 1 callersFunctionHandleClose
HandleClose 处理 websocket close 返回应答信息
plugins/websocket/ws/util/util.go:27
next →1–100 of 368, ranked by callers