Laid out concept for UdpSocket init

This commit is contained in:
Jonah Dahlquist 2019-08-13 20:15:14 -05:00 committed by Jonah Dahlquist
commit e8c8e3c9cc
3 changed files with 12 additions and 3 deletions

View file

@ -1,5 +1,12 @@
use crate::socket::Socket;
pub struct UdpSocket<SocketImpl: Socket> {
pub socket: SocketImpl,
socket: SocketImpl,
}
impl<SocketImpl: Socket> UdpSocket<SocketImpl> {
pub fn new(socket: SocketImpl) -> Self {
// TODO initialize socket for UDP mode
UdpSocket { socket }
}
}