Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/panjf2000/gnet
/ functions
Functions
759 in github.com/panjf2000/gnet
⨍
Functions
759
◇
Types & classes
122
Method
Close
Close closes the given Conn that belongs to the current event-loop. It must be called on the same event-loop that the connection belongs to. This meth
gnet.go:420
Method
Close
()
connection_windows.go:530
Method
Close
(c Conn)
eventloop_windows.go:78
Method
Close
()
connection_unix.go:543
Method
Close
Close closes the poller.
pkg/netpoll/poller_kqueue_ultimate.go:64
Method
Close
Close closes the poller.
pkg/netpoll/poller_epoll_ultimate.go:73
Method
Close
Close closes the poller.
pkg/netpoll/poller_epoll_default.go:72
Method
Close
Close closes the poller.
pkg/netpoll/poller_kqueue_default.go:63
Method
CloseWithCallback
(cb AsyncCallback)
connection_windows.go:547
Method
CloseWithCallback
(callback AsyncCallback)
connection_unix.go:533
Function
ClosestPowerOfTwo
ClosestPowerOfTwo returns n if it is a power-of-two, otherwise the closest power-of-two.
pkg/math/math.go:58
Method
Context
()
connection_windows.go:299
Method
Context
()
connection_unix.go:464
Method
Delete
Delete removes the given file descriptor from the poller.
pkg/netpoll/poller_kqueue_ultimate.go:235
Method
Delete
Delete removes the given file descriptor from the poller.
pkg/netpoll/poller_epoll_ultimate.go:246
Method
Delete
Delete removes the given file descriptor from the poller.
pkg/netpoll/poller_kqueue_default.go:222
Method
Dequeue
Dequeue removes and returns the value at the head of the queue. It returns nil if the queue is empty.
pkg/queue/lock_free_queue.go:129
Method
Discard
(n int)
connection_windows.go:198
Method
Discard
(n int)
connection_unix.go:381
Method
Discard
Discard skips the next n bytes by advancing the read pointer.
pkg/buffer/ring/ring_buffer.go:126
Method
Discard
Discard discards n bytes in this buffer.
pkg/buffer/elastic/elastic_ring_list_buffer.go:70
Method
Discard
Discard skips the next n bytes by advancing the read pointer.
pkg/buffer/elastic/elastic_ring_buffer.go:63
Method
Discard
Discard removes some nodes based on n bytes.
pkg/buffer/linkedlist/linked_list_buffer.go:176
Method
Dup
Dup returns a copy of the underlying file descriptor of listener. It is the caller's responsibility to close dupFD when finished. Closing listener doe
gnet.go:119
Method
Dup
()
connection_windows.go:321
Method
Dup
()
connection_unix.go:474
Method
EncodeEntry
(entry zapcore.Entry, fields []zapcore.Field)
pkg/logging/logger.go:133
Method
Enqueue
Enqueue puts the given value v at the tail of the queue.
pkg/queue/lock_free_queue.go:104
Method
Enroll
Enroll converts a net.Conn to gnet.Conn and then adds it into the Client.
client_unix.go:194
Method
Enroll
(ctx context.Context, c net.Conn)
eventloop_unix.go:62
Method
Enroll
(nc net.Conn)
client_windows.go:136
Method
Enroll
(ctx context.Context, c net.Conn)
eventloop_windows.go:50
Method
EventLoop
()
connection_windows.go:568
Method
EventLoop
()
connection_unix.go:550
Function
Example
()
pkg/netpoll/example_test.go:31
Method
Execute
(ctx context.Context, runnable Runnable)
eventloop_unix.go:72
Method
Execute
(ctx context.Context, runnable Runnable)
eventloop_windows.go:60
Method
Fd
Implementation of Socket interface func (c *conn) Gfd() gfd.GFD { return c.gfd }
connection_unix.go:473
Function
FloorToPowerOfTwo
FloorToPowerOfTwo returns n if it is a power-of-two, otherwise the next-highest power-of-two.
pkg/math/math.go:43
Method
Flush
()
connection_windows.go:284
Method
Flush
()
connection_unix.go:452
Method
FreeNode
FreeNode puts the given []byte back to the pool to free the memory.
pkg/buffer/linkedlist/linked_list_buffer.go:74
Function
Get
Get returns an empty byte buffer from the pool. Got byte buffer may be returned to the pool via Put call. This reduces the number of memory allocatio
pkg/pool/ringbuffer/ringbuffer.go:66
Method
InboundBuffered
()
connection_windows.go:288
Method
InboundBuffered
()
connection_unix.go:456
Method
IsEmpty
IsEmpty indicates whether this queue is empty or not.
pkg/queue/lock_free_queue.go:156
Method
IsEmpty
IsEmpty tells if this ring-buffer is empty.
pkg/buffer/ring/ring_buffer.go:477
Method
IsEmpty
IsEmpty indicates whether this buffer is empty.
pkg/buffer/elastic/elastic_ring_list_buffer.go:159
Method
IsEmpty
IsEmpty tells if this ring-buffer is empty.
pkg/buffer/elastic/elastic_ring_buffer.go:192
Function
IsErrorEvent
IsErrorEvent checks if the event is an error event.
pkg/netpoll/defs_poller_kqueue.go:51
Method
IsFull
IsFull tells if this ring-buffer is full.
pkg/buffer/elastic/elastic_ring_buffer.go:184
Function
IsPowerOfTwo
IsPowerOfTwo reports whether the given n is a power of two.
pkg/math/math.go:26
Function
IsReadEvent
IsReadEvent checks if the event is a read event.
pkg/netpoll/defs_poller_kqueue.go:41
Function
IsWriteEvent
IsWriteEvent checks if the event is a write event.
pkg/netpoll/defs_poller_kqueue.go:46
Method
Length
Length returns the number of elements in the queue.
pkg/queue/lock_free_queue.go:161
Method
Less
(i, j int)
pkg/pool/ringbuffer/ringbuffer.go:153
Method
LocalAddr
()
connection_windows.go:301
Method
LocalAddr
()
connection_unix.go:466
Method
ModRead
ModRead modifies the given file descriptor with readable event in the poller.
pkg/netpoll/poller_kqueue_ultimate.go:211
Method
ModRead
ModRead modifies the given file descriptor with readable event in the poller.
pkg/netpoll/poller_epoll_ultimate.go:224
Method
ModRead
ModRead modifies the given file descriptor with readable event in the poller.
pkg/netpoll/poller_kqueue_default.go:202
Method
ModReadWrite
ModReadWrite modifies the given file descriptor with readable and writable events in the poller.
pkg/netpoll/poller_kqueue_ultimate.go:221
Method
ModReadWrite
ModReadWrite modifies the given file descriptor with readable and writable events in the poller.
pkg/netpoll/poller_epoll_ultimate.go:235
Method
ModReadWrite
ModReadWrite modifies the given file descriptor with readable and writable events in the poller.
pkg/netpoll/poller_kqueue_default.go:210
Function
NewClient
(eh EventHandler, opts ...Option)
client_windows.go:33
Method
Next
(n int)
connection_windows.go:153
Method
Next
(n int)
connection_unix.go:333
Method
OnBoot
(eng Engine)
gnet_test.go:560
Method
OnBoot
(_ Engine)
gnet_test.go:889
Method
OnBoot
(eng Engine)
gnet_test.go:1031
Method
OnBoot
(eng Engine)
gnet_test.go:1403
Method
OnBoot
(eng Engine)
gnet_test.go:1470
Method
OnBoot
(eng Engine)
gnet_test.go:1569
Method
OnBoot
(_ Engine)
gnet_test.go:1624
Method
OnBoot
(eng Engine)
gnet_test.go:1756
Method
OnBoot
(_ Engine)
gnet_test.go:2039
Method
OnBoot
(eng Engine)
gnet_test.go:2512
Method
OnBoot
(Engine)
gnet_test.go:2760
Method
OnBoot
(eng Engine)
eventloop_unix_test.go:129
Method
OnBoot
(eng Engine)
eventloop_unix_test.go:252
Method
OnBoot
(e Engine)
client_test.go:38
Method
OnBoot
(eng Engine)
client_test.go:381
Method
OnBoot
(_ Engine)
client_test.go:593
Method
OnBoot
(Engine)
client_test.go:779
Method
OnClose
(c Conn, err error)
gnet_test.go:621
Method
OnClose
(Conn, error)
gnet_test.go:961
Method
OnClose
(Conn, error)
gnet_test.go:1041
Method
OnClose
(Conn, error)
gnet_test.go:1096
Method
OnClose
(Conn, error)
gnet_test.go:1201
Method
OnClose
(Conn, error)
gnet_test.go:1337
Method
OnClose
(Conn, error)
gnet_test.go:1408
Method
OnClose
(Conn, error)
gnet_test.go:1475
Method
OnClose
(Conn, error)
gnet_test.go:1611
Method
OnClose
(_ Conn, err error)
gnet_test.go:1770
Method
OnClose
(c Conn, err error)
gnet_test.go:2264
Method
OnClose
(c Conn, _ error)
gnet_test.go:2855
Method
OnClose
(Conn, error)
client_test.go:58
Method
OnClose
(c Conn, err error)
client_test.go:394
Method
OnClose
(_ Conn, _ error)
client_test.go:648
Method
OnClose
(Conn, error)
client_test.go:787
← previous
next →
401–500 of 759, ranked by callers