Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleConnection ¶
func HandleConnection(conn net.Conn, bc *core.Blockchain)
func StartServer ¶
func StartServer() error
Types ¶
type Address ¶
type Address struct { Address NetAddress Handshake bool Timestamp int64 }
type NetAddress ¶
func (*NetAddress) SetPort ¶
func (addr *NetAddress) SetPort()
SetPort sets the port of an address. Default is nodePort. If the address is known tho, make the port the actual port of the address. Usually all ports are the same.
func (NetAddress) String ¶
func (addr NetAddress) String() string
String converts a full netAddress to string
type Version ¶
type Version struct { Version int32 // 4 bytes // version of the node Timestamp int64 // 8 bytes // timestamp of when this version message is being sent AddrRecv NetAddress // eventually make this 26 bytes // address of where this is being sent AddrFrom NetAddress // address to whom this came from BlockHeight int32 // current height of the blockchain on the node }
Click to show internal directories.
Click to hide internal directories.