| 123456789101112131415161718192021222324252627282930313233 |
- package p2p
- import "net"
- type connFlag int32
- const (
- dynDialedConn connFlag = 1 << iota
- staticDialedConn
- inboundConn
- trustedConn
- )
- // conn wraps a network connection with information gathered
- // during the two handshakes.
- type conn struct {
- fd net.Conn
- //transport
- //node *enode.Node
- flags connFlag
- cont chan error // The run loop uses cont to signal errors to SetupConn.
- //caps []Cap // valid after the protocol handshake
- name string // valid after the protocol handshake
- }
- //func (c *conn) String() string {
- // s := c.flags.String()
- // if (c.node.ID() != enode.ID{}) {
- // s += " " + c.node.ID().String()
- // }
- // s += " " + c.fd.RemoteAddr().String()
- // return s
- //}
|