/// Spawns a socket worker for the given `transport`.
///
/// The created worker will serve the appropriate FIDL protocol over `channel`
/// and send [`Event::SocketEvent`] variants to the `event_loop`'s main mpsc
/// channel.
Spawns a socket worker for the given `transport`.
Spawns a socket worker for the given ` transport ` .
fn spawn_worker(
        &self,
        net_proto: IpVersion,
        transport: TransProto,
        channel: fasync::Channel,
        properties: SocketWorkerProperties,
    ) -> Result<(), libc::c_int> {
        match transport {
            TransProto::Udp => udp::spawn_worker(
                net_proto,
                self.ctx.clone(),
                psocket::DatagramSocketRequestStream::from_channel(channel),
                properties,
            ),
            _ => Err(libc::EAFNOSUPPORT),
        }
    }
fn spawn_worker ( & self , net_proto : IpVersion , transport : TransProto , channel : fasync :: Channel , properties : SocketWorkerProperties , ) -> Result < ( ) , libc :: c_int > { match transport { TransProto :: Udp => udp :: spawn_worker ( net_proto , self . ctx . clone ( ) , psocket :: DatagramSocketRequestStream :: from_channel ( channel ) , properties , ) , _ => Err ( libc :: EAFNOSUPPORT ) , } }
Spawns a socket worker for the given `transport`.
Spawns a socket worker for the given ` transport ` .
&self
net_proto
IpVersion
transport
TransProto
channel
fasync::Channel
properties
SocketWorkerProperties