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
↓ 1 callers
Function
SetIPv4MulticastMembership
SetIPv4MulticastMembership joins fd to the specified multicast IPv4 address. ifIndex is the index of the interface where the multicast datagrams will
pkg/socket/sockopts_posix.go:110
↓ 1 callers
Function
SetIPv6MulticastMembership
SetIPv6MulticastMembership joins fd to the specified multicast IPv6 address. ifIndex is the index of the interface where the multicast datagrams will
pkg/socket/sockopts_posix.go:137
↓ 1 callers
Function
SetKeepAlive
SetKeepAlive enables/disables the TCP keepalive feature on the socket.
pkg/socket/sockopts_unix.go:43
↓ 1 callers
Method
SetKeepAlive
(enabled bool, idle, intvl time.Duration, cnt int)
connection_windows.go:416
↓ 1 callers
Function
SetKeepAlivePeriod
SetKeepAlivePeriod enables the SO_KEEPALIVE option on the socket and sets TCP_KEEPIDLE/TCP_KEEPALIVE to the specified duration in seconds, TCP_KEEPCNT
pkg/socket/sockopts_darwin.go:29
↓ 1 callers
Function
SetLinger
SetLinger sets the behavior of Close on a connection which still has data waiting to be sent or to be acknowledged. If sec < 0 (the default), the ope
pkg/socket/sockopts_posix.go:72
↓ 1 callers
Function
SetMulticastMembership
SetMulticastMembership returns with a socket option function based on the IP version. Returns nil when multicast membership cannot be applied.
pkg/socket/sockopts_posix.go:86
↓ 1 callers
Method
SetReadDeadline
SetReadDeadline implements net.Conn.
gnet.go:476
↓ 1 callers
Method
SetSafeContext
(ctx any)
connection_windows.go:591
↓ 1 callers
Method
SetWriteDeadline
SetWriteDeadline implements net.Conn.
gnet.go:479
↓ 1 callers
Function
SockaddrToUDPAddr
SockaddrToUDPAddr converts a unix.Sockaddr to a net.UDPAddr Returns nil if conversion fails.
pkg/socket/sockaddr.go:128
↓ 1 callers
Function
TCPAddrToSockaddr
TCPAddrToSockaddr converts a net.TCPAddr to a Sockaddr. Returns nil if conversion fails.
pkg/socket/sockaddr.go:56
↓ 1 callers
Function
TCPSocket
TCPSocket creates a TCP socket and returns a file descriptor that refers to it. The given socket options will be set on the returned file descriptor.
pkg/socket/socket.go:44
↓ 1 callers
Function
UDPAddrToSockaddr
UDPAddrToSockaddr converts a net.UDPAddr to a Sockaddr. Returns nil if conversion fails.
pkg/socket/sockaddr.go:62
↓ 1 callers
Function
UDPSocket
UDPSocket creates a UDP socket and returns a file descriptor that refers to it. The given socket options will be set on the returned file descriptor.
pkg/socket/socket.go:50
↓ 1 callers
Function
UnixAddrToSockaddr
UnixAddrToSockaddr converts a net.UnixAddr to a Sockaddr, and returns the type (unix.SOCK_STREAM, unix.SOCK_DGRAM, unix.SOCK_SEQPACKET) Returns (nil,
pkg/socket/sockaddr.go:97
↓ 1 callers
Function
UnixSocket
UnixSocket creates a Unix socket and returns a file descriptor that refers to it. The given socket options will be set on the returned file descriptor
pkg/socket/socket.go:56
↓ 1 callers
Method
Unpack
(buf []byte)
gnet_test.go:1894
↓ 1 callers
Method
UpdateIndexes
UpdateIndexes updates the connStore indexes.
internal/gfd/gfd.go:78
↓ 1 callers
Function
WithOptions
WithOptions sets up all options.
options.go:163
↓ 1 callers
Method
WriteTo
WriteTo implements io.WriterTo.
pkg/buffer/elastic/elastic_ring_buffer.go:174
↓ 1 callers
Method
accept
(fd int, ev netpoll.IOEvent, flags netpoll.IOFlags)
acceptor_unix.go:77
↓ 1 callers
Method
activateReactors
(ctx context.Context, numEventLoop int)
engine_unix.go:137
↓ 1 callers
Function
batchSendAndRecv
(t *testing.T, c net.Conn, rd *bufio.Reader, packetSize, batch int)
gnet_test.go:1996
↓ 1 callers
Method
calibrate
()
pkg/pool/ringbuffer/ringbuffer.go:103
↓ 1 callers
Method
closeEventLoops
()
engine_windows.go:57
↓ 1 callers
Function
detectLinuxEthernetInterfaceName
()
os_unix_test.go:195
↓ 1 callers
Function
determineTCPProto
(proto string, addr *net.TCPAddr)
pkg/socket/tcp_socket.go:63
↓ 1 callers
Function
dtoi
Decimal to integer starting at &s[i0]. Returns number, new offset, success.
pkg/socket/sockaddr.go:183
↓ 1 callers
Function
dupCloseOnExec
dupCloseOnExec duplicates the given fd and marks it close-on-exec.
pkg/socket/fd_unix.go:40
↓ 1 callers
Function
dupCloseOnExecOld
dupCloseOnExecOld is the traditional way to dup an fd and set its O_CLOEXEC bit, using two system calls.
pkg/socket/fd_unix.go:61
↓ 1 callers
Function
epollWait
(epfd int, events []epollevent, msec int)
pkg/netpoll/syscall_epoll_generic_linux.go:25
↓ 1 callers
Function
getDevEncoder
()
pkg/logging/logger.go:152
↓ 1 callers
Function
getProdEncoder
()
pkg/logging/logger.go:163
↓ 1 callers
Method
hash
======================================= Implementation of Hash load-balancer ======================================== hash converts a string to a uniq
load_balancer.go:129
↓ 1 callers
Function
index
(n int)
pkg/pool/ringbuffer/ringbuffer.go:161
↓ 1 callers
Function
interfaceFirstIPv4Addr
interfaceFirstIPv4Addr returns the first IPv4 address of the interface.
pkg/socket/sockopts_posix.go:155
↓ 1 callers
Function
ipToSockaddrInet4
(ip net.IP, port int)
pkg/socket/sock_posix.go:27
↓ 1 callers
Function
ipToSockaddrInet6
(ip net.IP, port int, zone string)
pkg/socket/sock_posix.go:40
↓ 1 callers
Function
itod
itod converts uint to a decimal string.
pkg/socket/sockaddr.go:164
↓ 1 callers
Method
listenStream
(ln net.Listener)
acceptor_windows.go:26
↓ 1 callers
Function
maxListenerBacklog
()
pkg/socket/sock_bsd.go:26
↓ 1 callers
Method
open
(c *conn)
eventloop_unix.go:232
↓ 1 callers
Method
open
()
listener_unix.go:53
↓ 1 callers
Method
open
()
listener_windows.go:87
↓ 1 callers
Method
open
(oc *openConn)
eventloop_windows.go:188
↓ 1 callers
Method
peekAll
peekAll returns all bytes without advancing the read pointer.
pkg/buffer/ring/ring_buffer.go:107
↓ 1 callers
Function
process
(conn net.Conn)
client_test.go:759
↓ 1 callers
Method
read
(c *conn)
eventloop_windows.go:207
↓ 1 callers
Method
readUDP
(fd int, _ netpoll.IOEvent, _ netpoll.IOFlags)
eventloop_unix.go:451
↓ 1 callers
Method
readUDP
(c *conn)
eventloop_windows.go:225
↓ 1 callers
Method
resetBuffer
()
connection_windows.go:128
↓ 1 callers
Method
resetBuffer
()
connection_unix.go:308
↓ 1 callers
Method
runEventLoops
(ctx context.Context, numEventLoop int)
engine_unix.go:82
↓ 1 callers
Function
runSimClient
(t *testing.T, network, addr string, packetSize, batch int)
gnet_test.go:1969
↓ 1 callers
Method
start
(ctx context.Context, numEventLoop int)
engine_windows.go:67
↓ 1 callers
Method
start
(ctx context.Context, numEventLoop int)
engine_unix.go:190
↓ 1 callers
Function
startGnetClient
(t *testing.T, cli *Client, network, addr string, multicore, async, netDial bool)
client_test.go:535
↓ 1 callers
Method
startMcastClient
()
os_unix_test.go:107
↓ 1 callers
Method
stop
(ctx context.Context, engine Engine)
engine_windows.go:106
↓ 1 callers
Method
stop
(ctx context.Context, s Engine)
engine_unix.go:198
↓ 1 callers
Function
sysAccept
(fd int)
pkg/socket/sys_cloexec.go:40
↓ 1 callers
Function
tcpSocket
tcpSocket creates an endpoint for communication and returns a file descriptor that refers to that endpoint.
pkg/socket/tcp_socket.go:85
↓ 1 callers
Function
testCloseActionError
(t *testing.T, network, addr string)
gnet_test.go:1134
↓ 1 callers
Function
testCloseActionOnOpen
(t *testing.T, network, addr string)
gnet_test.go:1222
↓ 1 callers
Function
testCloseConnection
(t *testing.T, network, addr string)
gnet_test.go:1380
↓ 1 callers
Function
testConnWakeImmediately
(t *testing.T, client *Client, clientEV *clientEventsForWake, network, addr string)
client_test.go:665
↓ 1 callers
Function
testEngineStop
(t *testing.T, network, addr string)
gnet_test.go:1514
↓ 1 callers
Function
testSafeContext
(t *testing.T, network, addr string)
gnet_test.go:2870
↓ 1 callers
Function
testShutdown
(t *testing.T, network, addr string)
gnet_test.go:1067
↓ 1 callers
Function
testShutdownActionError
(t *testing.T, network, addr string)
gnet_test.go:1179
↓ 1 callers
Function
testShutdownActionOnOpen
(t *testing.T, network, addr string)
gnet_test.go:1270
↓ 1 callers
Function
testStop
(t *testing.T, network, addr string)
gnet_test.go:1450
↓ 1 callers
Function
testTick
(network, addr string, t *testing.T)
gnet_test.go:930
↓ 1 callers
Function
testUDPShutdown
(t *testing.T, network, addr string)
gnet_test.go:1320
↓ 1 callers
Function
testWakeConn
(t *testing.T, network, addr string)
gnet_test.go:996
↓ 1 callers
Function
udpSocket
udpSocket creates an endpoint for communication and returns a file descriptor that refers to that endpoint.
pkg/socket/udp_socket.go:83
↓ 1 callers
Function
udsSocket
udsSocket creates an endpoint for communication and returns a file descriptor that refers to that endpoint.
pkg/socket/unix_socket.go:47
↓ 1 callers
Function
unpackTCPConn
(tc *tcpConn)
connection_windows.go:73
↓ 1 callers
Method
write
(c *conn)
eventloop_unix.go:310
Method
AddRead
AddRead registers the given file descriptor with readable event to the poller.
pkg/netpoll/poller_kqueue_ultimate.go:183
Method
AddRead
AddRead registers the given file descriptor with readable event to the poller.
pkg/netpoll/poller_kqueue_default.go:178
Method
AddReadWrite
AddReadWrite registers the given file descriptor with readable and writable events to the poller.
pkg/netpoll/poller_kqueue_ultimate.go:167
Method
AddReadWrite
AddReadWrite registers the given file descriptor with readable and writable events to the poller.
pkg/netpoll/poller_epoll_ultimate.go:191
Method
AddReadWrite
AddReadWrite registers the given file descriptor with readable and writable events to the poller.
pkg/netpoll/poller_kqueue_default.go:165
Method
AddWrite
AddWrite registers the given file descriptor with writable event to the poller.
pkg/netpoll/poller_kqueue_ultimate.go:197
Method
AddWrite
AddWrite registers the given file descriptor with writable event to the poller.
pkg/netpoll/poller_epoll_ultimate.go:213
Method
AddWrite
AddWrite registers the given file descriptor with writable event to the poller.
pkg/netpoll/poller_epoll_default.go:209
Method
AddWrite
AddWrite registers the given file descriptor with writable event to the poller.
pkg/netpoll/poller_kqueue_default.go:190
Method
AllocNode
AllocNode allocates a []byte with the given length that is expected to be pushed into the Buffer.
pkg/buffer/linkedlist/linked_list_buffer.go:69
Method
Append
Append is like PushBack but appends b without copying it.
pkg/buffer/linkedlist/linked_list_buffer.go:79
Method
AsyncWrite
(buf []byte, callback AsyncCallback)
connection_unix.go:501
Method
AsyncWritev
(bs [][]byte, cb AsyncCallback)
connection_windows.go:491
Method
AsyncWritev
(bs [][]byte, callback AsyncCallback)
connection_unix.go:516
Function
BenchmarkByteSlice
(b *testing.B)
pkg/pool/byteslice/byteslice_test.go:32
Function
BenchmarkGC4El100k
(b *testing.B)
eventloop_unix_test.go:49
Function
BenchmarkGC4El200k
(b *testing.B)
eventloop_unix_test.go:63
Function
BenchmarkGC4El500k
(b *testing.B)
eventloop_unix_test.go:77
Method
Cap
Cap returns the size of the underlying buffer.
pkg/buffer/elastic/elastic_ring_buffer.go:137
Method
Close
(c Conn)
eventloop_unix.go:88
← previous
next →
301–400 of 759, ranked by callers