pub fn spawn_peer(
        peer_id: PeerId,
        target_delegate: Arc<TargetDelegate>,
        profile_proxy: ProfileProxy,
    ) -> RemotePeerHandle {
        let remote_peer =
            Arc::new(RwLock::new(RemotePeer::new(peer_id, target_delegate, profile_proxy)));

        fasync::spawn(tasks::state_watcher(remote_peer.clone()));

        RemotePeerHandle { peer: remote_peer }
    }
/// Create a remote peer and spawns the state watcher tasks around it.
/// Should only be called by peer manager.
Create a remote peer and spawns the state watcher tasks around it.
Should only be called by peer manager.
Create a remote peer and spawns the state watcher tasks around it . Should only be called by peer manager .
pub fn spawn_peer(
        peer_id: PeerId,
        target_delegate: Arc<TargetDelegate>,
        profile_proxy: ProfileProxy,
    ) -> RemotePeerHandle {
        let remote_peer =
            Arc::new(RwLock::new(RemotePeer::new(peer_id, target_delegate, profile_proxy)));
        fasync::spawn(tasks::state_watcher(remote_peer.clone()));
        RemotePeerHandle { peer: remote_peer }
    }
pub fn spawn_peer ( peer_id : PeerId , target_delegate : Arc < TargetDelegate > , profile_proxy : ProfileProxy , ) -> RemotePeerHandle { let remote_peer = Arc :: new ( RwLock :: new ( RemotePeer :: new ( peer_id , target_delegate , profile_proxy ) ) ) ; fasync :: spawn ( tasks :: state_watcher ( remote_peer . clone ( ) ) ) ; RemotePeerHandle { peer : remote_peer } }
Create a remote peer and spawns the state watcher tasks around it.
Create a remote peer and spawns the state watcher tasks around it .
peer_id
PeerId
target_delegate
Arc<TargetDelegate>
profile_proxy
ProfileProxy
peer_id
PeerId
target_delegate
Arc<TargetDelegate>
profile_proxy
ProfileProxy