Пример #1
0
 public ReceiverHandler(PeerHash peer, ReceiverConnection connection, ReceiverConfiguration configuration, ReceiverHooks hooks)
 {
     this.peer          = peer;
     this.hooks         = hooks;
     this.connection    = connection;
     this.configuration = configuration;
 }
Пример #2
0
 public static void CallKeepAliveReceived(this ReceiverHooks hooks, PeerHash peer)
 {
     hooks.OnKeepAliveReceived?.Invoke(new KeepAliveReceived
     {
         Peer = peer
     });
 }
Пример #3
0
 public static void CallMessageIgnored(this ReceiverHooks hooks, PeerHash peer, byte identifier, NetworkIncomingMessage payload)
 {
     hooks.OnMessageIgnored?.Invoke(new MessageIgnored
     {
         Peer       = peer,
         Identifier = identifier,
         Payload    = payload
     });
 }
Пример #4
0
 public static void CallMessageReceived(this ReceiverHooks hooks, PeerHash peer, string type, NetworkIncomingMessage payload)
 {
     hooks.OnMessageReceived?.Invoke(new MessageReceived
     {
         Peer    = peer,
         Type    = type,
         Payload = payload
     });
 }
Пример #5
0
 public ReceiverService(ReceiverParameters parameters, ReceiverConfiguration configuration, ReceiverHooks hooks)
 {
     this.hooks         = hooks;
     this.configuration = configuration;
 }