pub fn new(socket: UdpSocket, codec: C) -> UdpFramed<C> {
        Self {
            socket,
            codec,
            out_addr: SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(0, 0, 0, 0), 0)),
            rd: BytesMut::with_capacity(INITIAL_RD_CAPACITY),
            wr: BytesMut::with_capacity(INITIAL_WR_CAPACITY),
            flushed: true,
            is_readable: false,
            current_addr: None,
        }
    }
/// Create a new `UdpFramed` backed by the given socket and codec.
///
/// See struct level documentation for more details.
Create a new `UdpFramed` backed by the given socket and codec.
See struct level documentation for more details.
Create a new ` UdpFramed ` backed by the given socket and codec . See struct level documentation for more details .
pub fn new(socket: UdpSocket, codec: C) -> UdpFramed<C> {
        Self {
            socket,
            codec,
            out_addr: SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(0, 0, 0, 0), 0)),
            rd: BytesMut::with_capacity(INITIAL_RD_CAPACITY),
            wr: BytesMut::with_capacity(INITIAL_WR_CAPACITY),
            flushed: true,
            is_readable: false,
            current_addr: None,
        }
    }
pub fn new ( socket : UdpSocket , codec : C ) -> UdpFramed < C > { Self { socket , codec , out_addr : SocketAddr :: V4 ( SocketAddrV4 :: new ( Ipv4Addr :: new ( 0 , 0 , 0 , 0 ) , 0 ) ) , rd : BytesMut :: with_capacity ( INITIAL_RD_CAPACITY ) , wr : BytesMut :: with_capacity ( INITIAL_WR_CAPACITY ) , flushed : true , is_readable : false , current_addr : None , } }
Create a new `UdpFramed` backed by the given socket and codec.
Create a new ` UdpFramed ` backed by the given socket and codec .
socket
UdpSocket
codec
C