MCPcopy Create free account

hub / github.com/panjf2000/gnet / functions

Functions759 in github.com/panjf2000/gnet

↓ 3 callersFunctionloadOptions
(options ...Option)
options.go:26
↓ 3 callersFunctionnetDial
(network string, a T)
os_unix_test.go:257
↓ 3 callersFunctionpackUDPConn
(c *conn, buf []byte)
connection_windows.go:83
↓ 3 callersMethodpushBack
pushBack adds a new node to the tail of l.
pkg/buffer/linkedlist/linked_list_buffer.go:304
↓ 3 callersFunctionregisterInitConn
(el *eventloop)
eventloop_unix_test.go:36
↓ 3 callersMethodsendTo
(buf []byte, addr unix.Sockaddr)
connection_unix.go:292
↓ 3 callersFunctionstartClient
(t *testing.T, network, addr string, multicore, async bool, packetSize int, stallCh chan struct{})
gnet_test.go:827
↓ 3 callersFunctionsysSocket
(family, sotype, proto int)
pkg/socket/sys_cloexec.go:25
↓ 2 callersFunctionAccept
Accept accepts the next incoming socket along with setting O_NONBLOCK and O_CLOEXEC flags on it.
pkg/socket/socket.go:62
↓ 2 callersMethodAvailable
Available returns the length of available bytes to write.
pkg/buffer/elastic/elastic_ring_buffer.go:145
↓ 2 callersMethodEncode
(buf []byte)
gnet_test.go:1852
↓ 2 callersMethodEnrollContext
(nc net.Conn, ctx any)
client_windows.go:140
↓ 2 callersMethodEventLoopIndex
EventLoopIndex returns the eventloop index.
internal/gfd/gfd.go:58
↓ 2 callersMethodFd
()
connection_windows.go:304
↓ 2 callersMethodFd
Fd returns the underlying fd.
internal/gfd/gfd.go:53
↓ 2 callersMethodInfof
Infof logs messages at INFO level.
pkg/logging/logger.go:286
↓ 2 callersMethodLen
()
pkg/pool/ringbuffer/ringbuffer.go:149
↓ 2 callersFunctionNewContext
NewContext returns a new context.Context that carries the value that will be attached to the Conn.
context.go:29
↓ 2 callersMethodOnClose
OnClose fires when a connection has been closed. The parameter err is the last known connection error.
gnet.go:504
↓ 2 callersMethodOnOpen
OnOpen fires when a new connection has been opened. The Conn c has information about the connection such as its local and remote addresses. The param
gnet.go:500
↓ 2 callersMethodOnTick
OnTick fires immediately after the engine starts and will fire again following the duration specified by the delay return value.
gnet.go:513
↓ 2 callersMethodOutboundBuffered
OutboundBuffered returns the number of bytes that can be read from the current buffer. it's not concurrency-safe, you must invoke it within any method
gnet.go:281
↓ 2 callersMethodPeekWithBytes
PeekWithBytes is like Peek but accepts [][]byte and puts them onto head.
pkg/buffer/linkedlist/linked_list_buffer.go:142
↓ 2 callersMethodReadFrom
ReadFrom implements io.ReaderFrom.
pkg/buffer/elastic/elastic_ring_buffer.go:169
↓ 2 callersMethodReadFrom
ReadFrom implements io.ReaderFrom.
pkg/buffer/linkedlist/linked_list_buffer.go:201
↓ 2 callersMethodReset
Reset the read pointer and write pointer to zero.
pkg/buffer/elastic/elastic_ring_buffer.go:200
↓ 2 callersMethodSchedule
Schedule is like Execute, but it allows you to specify when the runnable is executed. In other words, the runnable will be executed when the delay dur
gnet.go:415
↓ 2 callersFunctionSetIPv6Only
SetIPv6Only restricts a IPv6 socket to only process IPv6 requests or both IPv4 and IPv6 requests.
pkg/socket/sockopts_posix.go:56
↓ 2 callersMethodSetLinger
SetLinger sets the behavior of Close on a connection which still has data waiting to be sent or to be acknowledged. If secs < 0 (the default), the op
gnet.go:348
↓ 2 callersFunctionSetNoDelay
SetNoDelay controls whether the operating system should delay packet transmission in hopes of sending fewer packets (Nagle's algorithm). The default
pkg/socket/sockopts_posix.go:34
↓ 2 callersFunctionSetRecvBuffer
SetRecvBuffer sets the size of the operating system's receive buffer associated with the connection.
pkg/socket/sockopts_posix.go:40
↓ 2 callersFunctionSetSendBuffer
SetSendBuffer sets the size of the operating system's transmit buffer associated with the connection.
pkg/socket/sockopts_posix.go:46
↓ 2 callersFunctionSockaddrToTCPOrUnixAddr
SockaddrToTCPOrUnixAddr converts a unix.Sockaddr to a net.TCPAddr or net.UnixAddr. Returns nil if conversion fails.
pkg/socket/sockaddr.go:114
↓ 2 callersFunctionWarnf
Warnf logs messages at WARN level.
pkg/logging/logger.go:261
↓ 2 callersFunctionWithLogLevel
WithLogLevel specifies the logging level for the local logging file.
options.go:283
↓ 2 callersFunctionWithLogPath
WithLogPath specifies a local path for logging file.
options.go:276
↓ 2 callersMethodWrite
Write appends data to this buffer.
pkg/buffer/elastic/elastic_ring_list_buffer.go:84
↓ 2 callersMethodWriteTo
(w io.Writer)
connection_windows.go:270
↓ 2 callersMethodWriteTo
WriteTo implements io.WriterTo.
pkg/buffer/linkedlist/linked_list_buffer.go:224
↓ 2 callersMethodaddWakeupEvent
()
pkg/netpoll/poller_kqueue_wakeup.go:25
↓ 2 callersFunctionbytes2iovec
(bs [][]byte)
pkg/io/io_bsd.go:62
↓ 2 callersFunctioncreateListeners
64KB
gnet.go:559
↓ 2 callersMethoddelConn
(c *conn)
conn_map.go:58
↓ 2 callersFunctiondetermineUDPProto
(proto string, addr *net.UDPAddr)
pkg/socket/udp_socket.go:61
↓ 2 callersMethoddrainWakeupEvent
()
pkg/netpoll/poller_kqueue_wakeup.go:54
↓ 2 callersMethoddup
()
listener_unix.go:49
↓ 2 callersMethodenroll
(c net.Conn, addr net.Addr, ctx any)
eventloop_unix.go:113
↓ 2 callersMethodenroll
(c net.Conn, addr net.Addr, ctx any)
eventloop_windows.go:86
↓ 2 callersMethodincConn
(delta int32)
eventloop_windows.go:140
↓ 2 callersMethodincCount
(_ int, delta int32)
conn_map.go:44
↓ 2 callersFunctionindex
(n uint32)
pkg/pool/byteslice/byteslice.go:74
↓ 2 callersFunctioninitListener
(network, addr string, options *Options)
listener_unix.go:84
↓ 2 callersFunctionip6ZoneToInt
ip6ZoneToInt converts an IP6 Zone net string to a unix int. Returns 0 if zone is "".
pkg/socket/sockaddr.go:140
↓ 2 callersFunctionip6ZoneToString
ip6ZoneToString converts an IP6 Zone unix int to a net string, Returns "" if zone is 0.
pkg/socket/sockaddr.go:153
↓ 2 callersMethodloadCount
()
conn_map.go:48
↓ 2 callersMethodpackPollAttachment
(handler netpoll.PollEventHandler)
listener_unix.go:44
↓ 2 callersMethodprocessIO
(_ int, filter netpoll.IOEvent, flags netpoll.IOFlags)
connection_bsd.go:27
↓ 2 callersMethodregister0
(c *conn)
eventloop_unix.go:215
↓ 2 callersFunctionrestorePollAttachment
(ptr unsafe.Pointer)
pkg/netpoll/poller_unix_ultimate.go:25
↓ 2 callersFunctionrun
(eventHandler EventHandler, listeners []*listener, options *Options, addrs []string)
engine_unix.go:230
↓ 2 callersFunctionstartStreamEchoServer
(t *testing.T, ln net.Listener)
gnet_test.go:2128
↓ 2 callersFunctionstartUDPEchoServer
(t *testing.T, c *net.UDPConn)
gnet_test.go:2110
↓ 2 callersMethodwake
(c *conn)
eventloop_unix.go:406
↓ 2 callersMethodwritev
(bs [][]byte)
connection_unix.go:187
↓ 1 callersMethodAddRead
AddRead registers the given file descriptor with readable event to the poller.
pkg/netpoll/poller_epoll_ultimate.go:202
↓ 1 callersMethodAddReadWrite
AddReadWrite registers the given file descriptor with readable and writable events to the poller.
pkg/netpoll/poller_epoll_default.go:189
↓ 1 callersMethodAsyncWrite
Gfd return an uninitialized GFD which is not valid, this method is only implemented for compatibility, don't use it on Windows. func (c *conn) Gfd() g
connection_windows.go:469
↓ 1 callersFunctionBytesToString
BytesToString converts byte slice to a string without any memory allocation.
pkg/bs/bs.go:23
↓ 1 callersMethodCloseWithCallback
CloseWithCallback closes the current connection, it's concurrency-safe. Usually you should provide a non-nil callback for this method, otherwise your
gnet.go:467
↓ 1 callersMethodDecode
(c Conn)
gnet_test.go:1864
↓ 1 callersFunctionDefault
Default instantiates a non-blocking goroutine pool with the capacity of DefaultAntsPoolSize.
pkg/pool/goroutine/goroutine.go:59
↓ 1 callersMethodDial
(network, addr string)
client_windows.go:120
↓ 1 callersMethodDialContext
(network, addr string, ctx any)
client_windows.go:124
↓ 1 callersFunctionFatalf
Fatalf logs messages at FATAL level.
pkg/logging/logger.go:275
↓ 1 callersMethodFlush
Flush writes any buffered data to the underlying connection, it's not concurrency-safe, you must invoke it within any method in EventHandler.
gnet.go:277
↓ 1 callersFunctionFromNetAddrContext
FromNetAddrContext retrieves the net.Addr value from ctx, if any.
context.go:61
↓ 1 callersFunctionFromNetConnContext
FromNetConnContext retrieves the net.Conn value from ctx, if any.
context.go:47
↓ 1 callersMethodGet
Get returns new byte buffer with zero length. The byte buffer may be returned to the pool via Put after the use in order to minimize GC overhead.
pkg/pool/ringbuffer/ringbuffer.go:72
↓ 1 callersFunctionIPAddrToSockaddr
IPAddrToSockaddr converts a net.IPAddr to a Sockaddr. Returns nil if conversion fails.
pkg/socket/sockaddr.go:50
↓ 1 callersMethodInc
()
internal/gfd/gfd.go:43
↓ 1 callersMethodIsEmpty
IsEmpty reports whether l is empty.
pkg/buffer/linkedlist/linked_list_buffer.go:256
↓ 1 callersFunctionIsErrorEvent
IsErrorEvent checks if the event is an error event.
pkg/netpoll/defs_poller_epoll.go:57
↓ 1 callersFunctionIsReadEvent
IsReadEvent checks if the event is a read event.
pkg/netpoll/defs_poller_epoll.go:47
↓ 1 callersFunctionIsWriteEvent
IsWriteEvent checks if the event is a write event.
pkg/netpoll/defs_poller_epoll.go:52
↓ 1 callersMethodModRead
ModRead modifies the given file descriptor with readable event in the poller.
pkg/netpoll/poller_epoll_default.go:219
↓ 1 callersFunctionNetAddrToSockaddr
NetAddrToSockaddr converts a net.Addr to a Sockaddr. Returns nil if the input is invalid or conversion is not possible.
pkg/socket/sockaddr.go:32
↓ 1 callersFunctionNewNetAddrContext
NewNetAddrContext returns a new context.Context that carries the net.Addr value.
context.go:56
↓ 1 callersFunctionNewNetConnContext
NewNetConnContext returns a new context.Context that carries the net.Conn value.
context.go:42
↓ 1 callersMethodOnBoot
OnBoot fires when the engine is ready for accepting connections. The parameter engine has information and various utilities.
gnet.go:524
↓ 1 callersMethodOnClose
OnClose fires when a connection has been closed. The parameter err is the last known connection error.
gnet.go:541
↓ 1 callersMethodOnOpen
OnOpen fires when a new connection has been opened. The parameter out is the return value which is going to be sent back to the remote.
gnet.go:535
↓ 1 callersMethodOnTick
OnTick fires immediately after the engine starts and will fire again following the duration specified by the delay return value.
gnet.go:552
↓ 1 callersMethodOnTraffic
OnTraffic fires when a local socket receives data from the remote.
gnet.go:546
↓ 1 callersMethodPut
Put releases byte buffer obtained via Get to the pool. The buffer mustn't be accessed after returning to the pool.
pkg/pool/ringbuffer/ringbuffer.go:89
↓ 1 callersMethodRead
(p []byte)
connection_windows.go:134
↓ 1 callersMethodReadFrom
(r io.Reader)
connection_unix.go:435
↓ 1 callersMethodReset
Reset resets the buffer.
pkg/buffer/elastic/elastic_ring_list_buffer.go:164
↓ 1 callersFunctionRotate
Rotate is like Run but accepts multiple network addresses.
gnet.go:705
↓ 1 callersMethodSequence
Sequence returns the monotonic sequence, only used to prevent fd duplication.
internal/gfd/gfd.go:73
↓ 1 callersMethodSetDeadline
SetDeadline implements net.Conn.
gnet.go:473
← previousnext →201–300 of 759, ranked by callers