MCPcopy Create free account
hub / github.com/cloudwego/netpoll / initNetFD

Method initNetFD

connection_impl.go:402–412  ·  view source on GitHub ↗
(conn Conn)

Source from the content-addressed store, hash-verified

400}
401
402func (c *connection) initNetFD(conn Conn) {
403 if nfd, ok := conn.(*netFD); ok {
404 c.netFD = *nfd
405 return
406 }
407 c.netFD = netFD{
408 fd: conn.Fd(),
409 localAddr: conn.LocalAddr(),
410 remoteAddr: conn.RemoteAddr(),
411 }
412}
413
414func (c *connection) initFDOperator() {
415 poll := pollmanager.Pick()

Callers 1

initMethod · 0.95

Calls 3

LocalAddrMethod · 0.80
RemoteAddrMethod · 0.80
FdMethod · 0.65

Tested by

no test coverage detected