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

@ -45,7 +45,7 @@ func (l *awdl) create(fromAWDL chan []byte, toAWDL chan []byte, name string) (*a
inPacket := func(packet []byte) {
intf.link.fromlink <- packet
}
intf.stream.init(inPacket)
intf.stream.init(nil, inPacket) // FIXME nil = ReadWriteCloser
go intf.handler()
l.mutex.Lock()
l.interfaces[name] = &intf