neoneo-go/pkg/network/addr_payload.go

26 lines
476 B
Go
Raw Normal View History

2018-01-27 15:00:28 +00:00
package network
import "net"
// AddrWithTimestamp payload.
type AddrWithTimestamp struct {
t uint32
services uint64
endpoint net.Addr
}
func newAddrWithTimestampFromPeer(p *Peer) AddrWithTimestamp {
return AddrWithTimestamp{
t: 1223345,
services: 1,
endpoint: p.conn.RemoteAddr(),
}
}
// AddrPayload container a list of known peer addresses.
type AddrPayload []AddrWithTimestamp
func (p AddrPayload) encode() ([]byte, error) {
return nil, nil
}