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

Method Serve

eventloop.go:27–27  ·  view source on GitHub ↗

Serve registers a listener and runs blockingly to provide services, including listening to ports, accepting connections and processing trans data. When an exception occurs or Shutdown is invoked, Serve will return an error which describes the specific reason.

(ln net.Listener)

Source from the content-addressed store, hash-verified

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.

Callers 6

newTestEventLoopFunction · 0.95
TestDialerFdAllocFunction · 0.95
TestFDCloseFunction · 0.95
TestDialerThenCloseFunction · 0.65

Implementers 1

eventLoopnetpoll_unix.go

Calls

no outgoing calls

Tested by 6

newTestEventLoopFunction · 0.76
TestDialerFdAllocFunction · 0.76
TestFDCloseFunction · 0.76
TestDialerThenCloseFunction · 0.52