MCPcopy Create free account

hub / github.com/panjf2000/gnet / functions

Functions759 in github.com/panjf2000/gnet

↓ 5 callersFunctionCleanup
Cleanup does something windup for logger, like closing, flushing, etc.
pkg/logging/logger.go:229
↓ 5 callersFunctionError
Error prints err if it's not nil.
pkg/logging/logger.go:238
↓ 5 callersMethodFd
Gfd returns the gfd of socket. Gfd() gfd.GFD Fd returns the underlying file descriptor.
gnet.go:317
↓ 5 callersFunctionFromContext
FromContext retrieves context value of the Conn stored in ctx, if any.
context.go:34
↓ 5 callersMethodGC
(secs int)
eventloop_unix_test.go:266
↓ 5 callersMethodInboundBuffered
InboundBuffered returns the number of bytes that can be read from the current buffer.
gnet.go:256
↓ 5 callersMethodModReadWrite
ModReadWrite modifies the given file descriptor with readable and writable events in the poller.
pkg/netpoll/poller_epoll_default.go:229
↓ 5 callersFunctionOpenPoller
OpenPoller instantiates a poller.
pkg/netpoll/poller_kqueue_ultimate.go:44
↓ 5 callersMethodValidate
Validate checks whether the engine is available.
gnet.go:60
↓ 5 callersFunctionWithBindToDevice
WithBindToDevice sets the name of the interface to which the listening socket will be bound. It is only available on Linux at the moment, an error wi
options.go:307
↓ 5 callersFunctionWithTCPNoDelay
WithTCPNoDelay enable/disable the TCP_NODELAY socket option.
options.go:248
↓ 5 callersFunctioncas
(p *unsafe.Pointer, old, new *node)
pkg/queue/lock_free_queue.go:169
↓ 5 callersMethodclose
(c *conn, err error)
eventloop_windows.go:282
↓ 5 callersMethodcloseEventLoops
()
engine_unix.go:63
↓ 5 callersMethodgetConn
(fd int)
conn_map.go:63
↓ 5 callersMethodinstance
()
pkg/buffer/elastic/elastic_ring_buffer.go:30
↓ 5 callersMethodread
(c *conn)
eventloop_unix.go:255
↓ 5 callersMethodticker
(ctx context.Context)
eventloop_unix.go:416
↓ 4 callersFunctionCreateLoggerAsLocalFile
CreateLoggerAsLocalFile setups the logger by local file path.
pkg/logging/logger.go:201
↓ 4 callersMethodDelete
Delete removes the given file descriptor from the poller.
pkg/netpoll/poller_epoll_default.go:239
↓ 4 callersFunctionDup
Dup duplicates the given fd and marks it close-on-exec.
pkg/socket/fd_unix.go:27
↓ 4 callersFunctionGet
Get returns a byte slice with given length from the built-in pool.
pkg/pool/byteslice/byteslice.go:34
↓ 4 callersFunctionGetTask
GetTask gets a cached Task from pool.
pkg/queue/queue.go:32
↓ 4 callersFunctionInfof
Infof logs messages at INFO level.
pkg/logging/logger.go:254
↓ 4 callersMethodLen
Len returns the length of the underlying buffer.
pkg/buffer/elastic/elastic_ring_buffer.go:129
↓ 4 callersMethodLength
()
pkg/queue/queue.go:47
↓ 4 callersFunctionNewClient
NewClient creates an instance of Client.
client_unix.go:45
↓ 4 callersMethodOnBoot
OnBoot fires when the engine is ready for accepting connections. The parameter engine has information and various utilities.
gnet.go:489
↓ 4 callersMethodOnShutdown
OnShutdown fires when the engine is being shut down, it is called right after all event-loops and connections are closed.
gnet.go:493
↓ 4 callersMethodPrintf
Printf implements the ants.Logger interface.
pkg/pool/goroutine/goroutine.go:54
↓ 4 callersMethodReadByte
ReadByte reads and returns the next byte from the input or ErrIsEmpty.
pkg/buffer/ring/ring_buffer.go:195
↓ 4 callersMethodRelease
Release frees all resource of this buffer.
pkg/buffer/elastic/elastic_ring_list_buffer.go:173
↓ 4 callersMethodSetReadBuffer
SetReadBuffer sets the size of the operating system's receive buffer associated with the connection.
gnet.go:330
↓ 4 callersMethodSetWriteBuffer
SetWriteBuffer sets the size of the operating system's transmit buffer associated with the connection.
gnet.go:334
↓ 4 callersMethodStart
Start starts the client event-loop, handing IO events.
client_unix.go:106
↓ 4 callersFunctionWithEdgeTriggeredIOChunk
WithEdgeTriggeredIOChunk sets the number of bytes that `gnet` can read/write up to in one event loop of ET.
options.go:322
↓ 4 callersFunctionWithLoadBalancing
WithLoadBalancing picks the load-balancing algorithm for gnet engine.
options.go:198
↓ 4 callersFunctionWithLogger
WithLogger specifies a customized logger.
options.go:290
↓ 4 callersFunctionWithNumEventLoop
WithNumEventLoop sets the number of event loops for gnet engine.
options.go:205
↓ 4 callersFunctionWithReadBufferCap
WithReadBufferCap sets ReadBufferCap for reading bytes.
options.go:184
↓ 4 callersFunctionWithSocketRecvBuffer
WithSocketRecvBuffer sets the maximum socket receive buffer of kernel in bytes.
options.go:255
↓ 4 callersFunctionWithTCPKeepCount
WithTCPKeepCount sets the number of keep-alive probes that will be sent before the connection is considered dead and dropped.
options.go:241
↓ 4 callersFunctionWithTCPKeepInterval
WithTCPKeepInterval sets the interval between TCP keep-alive probes.
options.go:233
↓ 4 callersFunctionWithWriteBufferCap
WithWriteBufferCap sets WriteBufferCap for pending bytes.
options.go:191
↓ 4 callersMethodWriteTo
(w io.Writer)
connection_unix.go:439
↓ 4 callersMethodcloseConns
()
eventloop_unix.go:100
↓ 4 callersFunctiondetermineEventLoops
(opts *Options)
gnet.go:801
↓ 4 callersMethoddone
()
pkg/buffer/elastic/elastic_ring_buffer.go:46
↓ 4 callersMethodexpand
()
pkg/netpoll/defs_poller_epoll.go:70
↓ 4 callersFunctionfindLoopbackInterface
()
os_unix_test.go:65
↓ 4 callersMethodgetLogger
()
eventloop_windows.go:82
↓ 4 callersMethodincCount
(row int, delta int32)
conn_matrix.go:52
↓ 4 callersMethodinit
()
conn_map.go:30
↓ 4 callersFunctionipToSockaddr
(family int, ip net.IP, port int, zone string)
pkg/socket/sock_posix.go:72
↓ 4 callersFunctionnewEventList
(size int)
pkg/netpoll/defs_poller_epoll.go:66
↓ 4 callersFunctionpackTCPConn
(c *conn, buf []byte)
connection_windows.go:67
↓ 4 callersMethodpushFront
pushFront adds the new node to the head of l.
pkg/buffer/linkedlist/linked_list_buffer.go:288
↓ 4 callersFunctionsetKeepAlive
(fd int, enabled bool, idle, intvl time.Duration, cnt int)
engine_unix.go:281
↓ 4 callersMethodshrink
()
pkg/netpoll/defs_poller_epoll.go:77
↓ 4 callersFunctiontestConnMatrix
(t *testing.T, n int)
conn_matrix_test.go:48
↓ 4 callersMethodwakePoller
()
pkg/netpoll/poller_kqueue_wakeup.go:34
↓ 3 callersMethodAddRead
AddRead registers the given file descriptor with readable event to the poller.
pkg/netpoll/poller_epoll_default.go:199
↓ 3 callersMethodAsyncWritev
AsyncWritev writes multiple byte slices to remote asynchronously, you don't have to invoke it within any method in EventHandler, usually you would cal
gnet.go:297
↓ 3 callersMethodBytes
Bytes returns all available read bytes. It does not move the read pointer and only copy the available data.
pkg/buffer/elastic/elastic_ring_buffer.go:161
↓ 3 callersMethodCountConnections
CountConnections counts the number of currently active connections and returns it.
gnet.go:71
↓ 3 callersMethodDialContext
DialContext is like Dial but also accepts an empty interface ctx that can be obtained later via Conn.Context.
client_unix.go:185
↓ 3 callersMethodEnroll
Enroll is like Register, but it accepts an established net.Conn instead of a net.Addr, it's concurrency-safe.
gnet.go:407
↓ 3 callersMethodEnrollContext
EnrollContext is like Enroll but also accepts an empty interface ctx that can be obtained later via Conn.Context.
client_unix.go:199
↓ 3 callersMethodExecute
Execute will execute the given runnable on the event-loop at some time in the future, it's concurrency-safe.
gnet.go:410
↓ 3 callersFunctionGetTCPSockAddr
GetTCPSockAddr the structured addresses based on the protocol and raw address.
pkg/socket/tcp_socket.go:33
↓ 3 callersFunctionGetUDPSockAddr
GetUDPSockAddr the structured addresses based on the protocol and raw address.
pkg/socket/udp_socket.go:31
↓ 3 callersFunctionGetUnixSockAddr
GetUnixSockAddr the structured addresses based on the protocol and raw address.
pkg/socket/unix_socket.go:30
↓ 3 callersFunctionIPToSockaddr
IPToSockaddr converts a net.IP (with optional IPv6 Zone) to a Sockaddr Returns nil if conversion fails.
pkg/socket/sockaddr.go:68
↓ 3 callersMethodLen
Len returns the length of the list.
pkg/buffer/linkedlist/linked_list_buffer.go:246
↓ 3 callersMethodListenUDP
(pc net.PacketConn)
acceptor_windows.go:63
↓ 3 callersFunctionLogLevel
LogLevel tells what the default logging level is.
pkg/logging/logger.go:196
↓ 3 callersFunctionNew
New instantiates an elastic.Buffer and returns it.
pkg/buffer/elastic/elastic_ring_list_buffer.go:36
↓ 3 callersFunctionNewGFD
NewGFD creates a new GFD.
internal/gfd/gfd.go:93
↓ 3 callersFunctionPut
Put returns the byte slice to the built-in pool.
pkg/pool/byteslice/byteslice.go:39
↓ 3 callersMethodReadFrom
ReadFrom implements io.ReaderFrom.
pkg/buffer/ring/ring_buffer.go:343
↓ 3 callersMethodSendTo
not concurrency-safe SendTo transmits a message to the given address, it's not concurrency-safe. It is available only for UDP sockets, an ErrUnsupport
gnet.go:269
↓ 3 callersFunctionSetKeepAlive
SetKeepAlive enables/disables the TCP keepalive feature on the socket.
pkg/socket/sockopts_darwin.go:43
↓ 3 callersMethodSetKeepAlivePeriod
SetKeepAlivePeriod tells the operating system to send keep-alive messages on the connection and sets period between TCP keep-alive probes.
gnet.go:352
↓ 3 callersMethodSetNoDelay
SetNoDelay controls whether the operating system should delay packet transmission in hopes of sending fewer packets (Nagle's algorithm). The default i
gnet.go:373
↓ 3 callersMethodStop
Stop stops the client event-loop.
client_unix.go:153
↓ 3 callersMethodWarnf
Warnf logs messages at WARN level.
pkg/logging/logger.go:288
↓ 3 callersFunctionWithMulticastInterfaceIndex
WithMulticastInterfaceIndex sets the interface name where UDP multicast sockets will be bound to.
options.go:297
↓ 3 callersFunctionWithReuseAddr
WithReuseAddr sets SO_REUSEADDR socket option.
options.go:219
↓ 3 callersFunctionWithSocketSendBuffer
WithSocketSendBuffer sets the maximum socket send buffer of kernel in bytes.
options.go:262
↓ 3 callersMethodWriteByte
WriteByte writes one byte into buffer.
pkg/buffer/ring/ring_buffer.go:254
↓ 3 callersMethodWriteString
WriteString writes the contents of the string s to buffer, which accepts a slice of bytes.
pkg/buffer/ring/ring_buffer.go:312
↓ 3 callersMethodWriteTo
WriteTo implements io.WriterTo.
pkg/buffer/ring/ring_buffer.go:395
↓ 3 callersMethodaddConn
(c *conn, index int)
conn_map.go:52
↓ 3 callersFunctionbenchServeGC
(b *testing.B, network, addr string, async bool, elNum int, initConnCount int32)
eventloop_unix_test.go:91
↓ 3 callersMethodcountConn
()
eventloop_unix.go:96
↓ 3 callersFunctionerrnoErr
errnoErr returns common boxed Errno values, to prevent allocations at runtime.
pkg/netpoll/syscall_errors_linux.go:21
↓ 3 callersFunctiongetInterfaceIP
(ifname string, ipv4 bool)
os_unix_test.go:218
↓ 3 callersMethodgrow
(newCap int)
pkg/buffer/ring/ring_buffer.go:487
↓ 3 callersMethodhandleAction
(c *conn, action Action)
eventloop_unix.go:477
↓ 3 callersMethodhandleAction
(c *conn, action Action)
eventloop_windows.go:299
← previousnext →101–200 of 759, ranked by callers