コード例 #1
0
 public static void CallListenerStarted(this PeerListenerHooks hooks, PeerListenerConfiguration configuration, int assignedPort)
 {
     hooks.OnListenerStarted?.Invoke(new ListenerStarted
     {
         Port = assignedPort
     });
 }
コード例 #2
0
 public static void CallListenerFailed(this PeerListenerHooks hooks, PeerListenerConfiguration configuration, int requestedPort, string reason)
 {
     hooks.OnListenerFailed?.Invoke(new ListenerFailed
     {
         Port   = requestedPort,
         Reason = reason
     });
 }
コード例 #3
0
ファイル: PeerListener.cs プロジェクト: vnvizitiu/leak
        public PeerListener(PeerListenerDependencies dependencies, PeerListenerHooks hooks, PeerListenerConfiguration configuration)
        {
            this.dependencies  = dependencies;
            this.hooks         = hooks;
            this.configuration = configuration;

            this.socket = dependencies.Network.New();
        }
コード例 #4
0
ファイル: PeerListenerBuilder.cs プロジェクト: vnvizitiu/leak
 public PeerListenerBuilder()
 {
     dependencies  = new PeerListenerDependencies();
     configuration = new PeerListenerConfiguration();
 }