use *receivedPacket thoughout the session

This commit is contained in:
Lucas Clemente
2016-09-07 14:10:32 +02:00
parent e3c90c181a
commit 099545521f
5 changed files with 33 additions and 29 deletions

View File

@@ -43,7 +43,7 @@ func newLinkedConnection(other *Session) *linkedConnection {
Expect(err).NotTo(HaveOccurred())
}
hdr.Raw = packet[:len(packet)-r.Len()]
conn.other.handlePacket(nil, hdr, packet[len(packet)-r.Len():])
conn.other.handlePacket(&receivedPacket{publicHeader: hdr, data: packet[len(packet)-r.Len():]})
}
}()
return conn