|
|
@ -34,7 +34,7 @@ func (host *HostV1) GetSelfPeer() p2p.Peer { |
|
|
|
// BindHandlerAndServe Version 0 p2p. Going to be deprecated.
|
|
|
|
// BindHandlerAndServe Version 0 p2p. Going to be deprecated.
|
|
|
|
func (host *HostV1) BindHandlerAndServe(handler p2p.StreamHandler) { |
|
|
|
func (host *HostV1) BindHandlerAndServe(handler p2p.StreamHandler) { |
|
|
|
port := host.self.Port |
|
|
|
port := host.self.Port |
|
|
|
addr := net.JoinHostPort(host.self.IP, port) |
|
|
|
addr := net.JoinHostPort("", port) |
|
|
|
var err error |
|
|
|
var err error |
|
|
|
host.listener, err = net.Listen("tcp4", addr) |
|
|
|
host.listener, err = net.Listen("tcp4", addr) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|