Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Allenxuxu/gev
/ functions
Functions
368 in github.com/Allenxuxu/gev
⨍
Functions
368
◇
Types & classes
78
↓ 45 callers
Method
Get
(key string)
context.go:27
↓ 34 callers
Method
WriteString
(s string)
plugins/websocket/ws/http.go:341
↓ 29 callers
Method
Close
()
eventloop/eventloop.go:23
↓ 29 callers
Method
Write
(p []byte)
plugins/websocket/ws/http.go:347
↓ 27 callers
Function
Error
Error provides warn level logging
log/log.go:118
↓ 23 callers
Method
Set
(key string, value interface{})
context.go:11
↓ 22 callers
Function
Address
Address server 监听地址
options.go:69
↓ 20 callers
Function
NewServer
NewServer 创建 Server
server.go:36
↓ 19 callers
Function
NumLoops
NumLoops work eventloop 的数量
options.go:76
↓ 17 callers
Function
Network
Network [tcp] 暂时只支持tcp
options.go:62
↓ 15 callers
Function
Info
Info provides info level logging
log/log.go:108
↓ 15 callers
Method
Send
Send 用来在非 loop 协程发送
server_std.go:237
↓ 13 callers
Method
PeerAddr
PeerAddr 获取客户端地址信息
server_std.go:227
↓ 12 callers
Method
Stop
Stop 关闭 Server
server.go:109
↓ 12 callers
Method
Swap
(i, j int)
benchmark_load_balance_test.go:13
↓ 11 callers
Method
Start
Start 启动 Server
server.go:94
↓ 10 callers
Function
RejectConnectionError
RejectConnectionError constructs an error that could be used to control the way handshake is rejected by Upgrader.
plugins/websocket/ws/errors.go:111
↓ 10 callers
Function
RejectionReason
RejectionReason returns an option that makes connection to be rejected with given reason.
plugins/websocket/ws/errors.go:87
↓ 10 callers
Function
RejectionStatus
RejectionStatus returns an option that makes connection to be rejected with given HTTP status code.
plugins/websocket/ws/errors.go:95
↓ 9 callers
Function
ReusePort
ReusePort 设置 SO_REUSEPORT
options.go:55
↓ 9 callers
Method
Start
Start server
example/pushmessage/main.go:36
↓ 9 callers
Function
errorText
errorText is a non-performant error text generator. NOTE: Used only to generate constants.
plugins/websocket/ws/http.go:282
↓ 8 callers
Method
Error
Error implements error interface.
plugins/websocket/ws/errors.go:13
↓ 7 callers
Function
FrameToBytes
FrameToBytes return bytes
plugins/websocket/ws/frame.go:274
↓ 7 callers
Method
String
()
example/protobuf/proto/user.pb.go:46
↓ 6 callers
Method
Close
Close 关闭连接
server_std.go:265
↓ 6 callers
Method
ConnectionCount
()
eventloop/eventloop.go:75
↓ 6 callers
Method
handleClose
(fd int)
connection.go:288
↓ 5 callers
Function
NewFrame
NewFrame creates frame with given operation code, flag of completeness and payload bytes.
plugins/websocket/ws/frame.go:196
↓ 5 callers
Method
QueueInLoop
QueueInLoop 添加 func 到事件循环中执行
eventloop/eventloop.go:131
↓ 5 callers
Function
handler
(conn net.Conn, startC chan interface{}, closeC chan interface{}, result, req chan int64)
benchmarks/client/main.go:56
↓ 4 callers
Function
CustomProtocol
CustomProtocol 数据包处理
options.go:83
↓ 4 callers
Method
In
In reports whether the code is defined in given range.
plugins/websocket/ws/frame.go:102
↓ 4 callers
Function
Infof
Infof provides info level logging
log/log.go:113
↓ 4 callers
Method
Log
(v ...interface{})
log/log.go:12
↓ 4 callers
Function
New
New 创建一个 EventLoop
eventloop/eventloop.go:50
↓ 4 callers
Function
PackCloseData
PackCloseData 封装 websocket close 数据包
plugins/websocket/ws/util/util.go:22
↓ 4 callers
Function
PackData
PackData 封装 websocket message 数据包
plugins/websocket/ws/util/util.go:10
↓ 4 callers
Method
Packet
(c *Connection, data interface{})
protocol.go:12
↓ 4 callers
Method
RunEvery
RunEvery 定时任务
server.go:76
↓ 4 callers
Method
UnPacket
(c *Connection, buffer *ringbuffer.RingBuffer)
protocol.go:11
↓ 4 callers
Function
WithLevel
WithLevel logs with the level specified
log/log.go:82
↓ 4 callers
Function
WithLevelf
WithLevelf logs with the level specified
log/log.go:90
↓ 4 callers
Method
kEvents
(old Event, new Event, fd int)
poller/kqueue.go:126
↓ 3 callers
Method
Delete
(key string)
context.go:21
↓ 3 callers
Function
MetricsServer
(path, address string)
options.go:102
↓ 3 callers
Function
NewCloseFrame
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 callers
Function
NewCloseFrameBody
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 callers
Function
NewWebSocketServer
NewWebSocketServer 创建 WebSocket Server
example/websocket/wsserver.go:10
↓ 3 callers
Function
RoundRobin
()
load_balance.go:7
↓ 3 callers
Method
Stop
Stop server
example/pushmessage/main.go:42
↓ 3 callers
Function
file_proto_user_proto_rawDescGZIP
()
example/protobuf/proto/user.pb.go:215
↓ 3 callers
Function
httpWriteHeaderKey
(bw *bufio.Writer, key string)
plugins/websocket/ws/http.go:169
↓ 3 callers
Method
mod
(fd int, events uint32)
poller/epoll.go:111
↓ 3 callers
Function
statusText
statusText is a non-performant status text generator. NOTE: Used only to generate constants.
plugins/websocket/ws/http.go:272
↓ 2 callers
Method
AddSocketAndEnableRead
AddSocketAndEnableRead 增加 Socket 到事件循环中,并注册可读事件
eventloop/eventloop.go:89
↓ 2 callers
Function
Create
Create 创建Poller
poller/epoll.go:26
↓ 2 callers
Function
IdleTime
IdleTime 最大空闲时间(秒)
options.go:90
↓ 2 callers
Function
LeastConnection
()
load_balance.go:16
↓ 2 callers
Function
LoadBalance
(strategy LoadBalanceStrategy)
options.go:96
↓ 2 callers
Function
New
New 创建 websocket Protocol
plugins/websocket/protocol.go:22
↓ 2 callers
Function
NewBinaryFrame
NewBinaryFrame creates binary frame with p as payload. Note that p is not copied.
plugins/websocket/ws/frame.go:215
↓ 2 callers
Function
NewConnection
NewConnection 创建 Connection
server_std.go:177
↓ 2 callers
Function
NewHandlerWrap
NewHandlerWrap websocket handler wrap
plugins/websocket/wrap.go:25
↓ 2 callers
Function
NewTextFrame
NewTextFrame creates text frame with p as payload. Note that p is not copied.
plugins/websocket/ws/frame.go:209
↓ 2 callers
Method
Next
(prev time.Time)
everyscheduler.go:9
↓ 2 callers
Method
OnClose
(c *Connection)
connection.go:24
↓ 2 callers
Method
OnConnect
(c *Connection)
server_std.go:25
↓ 2 callers
Method
OnMessage
(c *Connection, ctx interface{}, data []byte)
connection.go:23
↓ 2 callers
Method
Options
Options 返回 options
server.go:128
↓ 2 callers
Function
PackMessage
PackMessage 按自定义协议打包数据
plugins/protobuf/protobuf.go:6
↓ 2 callers
Method
Poll
Poll 启动 epoll wait 循环
poller/epoll.go:134
↓ 2 callers
Method
Reset
()
example/protobuf/proto/user.pb.go:37
↓ 2 callers
Function
SetLevel
SetLevel sets the log level
log/log.go:150
↓ 2 callers
Method
ShutdownWrite
ShutdownWrite 关闭可写端,等待读取完接收缓冲区所有数据
server_std.go:283
↓ 2 callers
Method
UserBuffer
()
server_std.go:212
↓ 2 callers
Method
Wake
Wake 唤醒 epoll
poller/epoll.go:60
↓ 2 callers
Method
WriteBufferLength
WriteBufferLength write buffer 当前积压的数据长度
server_std.go:293
↓ 2 callers
Function
WriteHeader
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 callers
Method
add
(fd int, events uint32)
poller/epoll.go:89
↓ 2 callers
Function
asciiToInt
asciiToInt converts bytes to int.
plugins/websocket/ws/util.go:9
↓ 2 callers
Function
btrim
(bts []byte)
plugins/websocket/ws/util.go:50
↓ 2 callers
Method
handlerProtocol
(tmpBuffer *[]byte, buffer *ringbuffer.RingBuffer)
connection.go:208
↓ 2 callers
Function
min
(a, b int)
plugins/websocket/ws/util.go:88
↓ 2 callers
Function
newOptions
(opt ...Option)
options.go:25
↓ 2 callers
Method
sendInLoop
(data []byte)
connection.go:305
↓ 2 callers
Function
testData
()
benchmark_load_balance_test.go:27
↓ 2 callers
Function
writeErrorText
(bw *bufio.Writer, err error)
plugins/websocket/ws/http.go:261
↓ 2 callers
Function
writeStatusText
(bw *bufio.Writer, code int)
plugins/websocket/ws/http.go:251
↓ 1 callers
Method
AddRead
AddRead 注册fd到epoll,并注册可读事件
poller/epoll.go:97
↓ 1 callers
Function
CheckCloseFrameData
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 callers
Function
Cipher
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 callers
Method
Close
Close 关闭连接
connection.go:145
↓ 1 callers
Function
Create
Create 创建Poller
poller/kqueue.go:24
↓ 1 callers
Method
Del
Del 从epoll中删除fd
poller/epoll.go:107
↓ 1 callers
Method
DeleteFdInLoop
DeleteFdInLoop 删除 fd
eventloop/eventloop.go:80
↓ 1 callers
Method
EnableRead
EnableRead 修改fd注册事件为可读事件
poller/epoll.go:129
↓ 1 callers
Method
EnableReadWrite
EnableReadWrite 修改fd注册事件为可读可写事件
poller/epoll.go:119
↓ 1 callers
Function
Errorf
Errorf provides warn level logging
log/log.go:123
↓ 1 callers
Function
HandleClose
HandleClose 处理 websocket close 返回应答信息
plugins/websocket/ws/util/util.go:27
next →
1–100 of 368, ranked by callers