MCPcopy Index your code
hub / github.com/subtrace/subtrace / PeerAddr

Method PeerAddr

cmd/run/socket/socket.go:473–480  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

471}
472
473func (s *Socket) PeerAddr() (netip.AddrPort, syscall.Errno, error) {
474 if !s.FD.IncRef() {
475 return netip.AddrPort{}, unix.EBADF, nil
476 }
477 defer s.FD.DecRef()
478
479 return s.Inode.state.Load().getRemotePeerAddr()
480}
481
482func (s *Socket) Errno() unix.Errno {
483 if !s.FD.IncRef() {

Callers 2

handleAcceptMethod · 0.80
handleGetpeernameMethod · 0.80

Calls 4

IncRefMethod · 0.80
DecRefMethod · 0.80
getRemotePeerAddrMethod · 0.80
LoadMethod · 0.80

Tested by

no test coverage detected