Work in progress, add a linkInterfaceMsgIO interface type and make stream implement it, this will be used by link

This commit is contained in:
Arceliar 2019-01-21 21:27:52 -06:00
parent c8e1be0f73
commit 5a4d6481dd
4 changed files with 110 additions and 6 deletions

View file

@ -440,7 +440,7 @@ func (iface *tcpInterface) handler(sock net.Conn, incoming bool) {
themAddrString := net.IP(themAddr[:]).String()
themString := fmt.Sprintf("%s@%s", themAddrString, them)
iface.core.log.Printf("Connected: %s, source: %s", themString, us)
iface.stream.init(p.handlePacket)
iface.stream.init(sock, p.handlePacket)
bs := make([]byte, 2*streamMsgSize)
var n int
for {