MCPcopy Index your code
hub / github.com/cloudwego/netpoll / EventLoop

Interface EventLoop

eventloop.go:23–35  ·  view source on GitHub ↗

A EventLoop is a network server.

Source from the content-addressed store, hash-verified

21
22// A EventLoop is a network server.
23type EventLoop interface {
24 // Serve registers a listener and runs blockingly to provide services, including listening to ports,
25 // accepting connections and processing trans data. When an exception occurs or Shutdown is invoked,
26 // Serve will return an error which describes the specific reason.
27 Serve(ln net.Listener) error
28
29 // Shutdown is used to graceful exit.
30 // It will close all idle connections on the server, but will not change the underlying pollers.
31 //
32 // Argument: ctx set the waiting deadline, after which an error will be returned,
33 // but will not force the closing of connections in progress.
34 Shutdown(ctx context.Context) error
35}
36
37/* The Connection Callback Sequence Diagram
38| Connection State | Callback Function | Notes

Callers 14

newTestEventLoopFunction · 0.95
TestDialerFdAllocFunction · 0.95
TestFDCloseFunction · 0.95
TestDialerThenCloseFunction · 0.65
TestDialerFdAllocFunction · 0.95
TestFDCloseFunction · 0.95
TestOnConnectFunction · 0.65
TestOnConnectWriteFunction · 0.65

Implementers 1

eventLoopnetpoll_unix.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…