Changed UdpSocket to store a socket reference

This commit is contained in:
Jonah Dahlquist 2019-08-13 20:26:02 -05:00 committed by Jonah Dahlquist
commit 715cdea318
2 changed files with 11 additions and 8 deletions

View file

@ -50,7 +50,10 @@ impl<SpiBus: ActiveBus, NetworkImpl: Network> W5500<SpiBus, NetworkImpl> {
Ok(())
}
pub fn open_udp_socket<SocketImpl: Socket>(&self, socket: SocketImpl) -> UdpSocket<SocketImpl> {
pub fn open_udp_socket<'a, SocketImpl: Socket>(
&self,
socket: &'a mut SocketImpl,
) -> UdpSocket<'a, SocketImpl> {
// TODO compare socket to sockets list
UdpSocket::new(socket)
}