Exemplo n.º 1
0
 public ReceiverHandler(PeerHash peer, ReceiverConnection connection, ReceiverConfiguration configuration, ReceiverHooks hooks)
 {
     this.peer          = peer;
     this.hooks         = hooks;
     this.connection    = connection;
     this.configuration = configuration;
 }
Exemplo n.º 2
0
 public static void CallKeepAliveReceived(this ReceiverHooks hooks, PeerHash peer)
 {
     hooks.OnKeepAliveReceived?.Invoke(new KeepAliveReceived
     {
         Peer = peer
     });
 }
Exemplo n.º 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
     });
 }
Exemplo n.º 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
     });
 }
Exemplo n.º 5
0
 public ReceiverService(ReceiverParameters parameters, ReceiverConfiguration configuration, ReceiverHooks hooks)
 {
     this.hooks         = hooks;
     this.configuration = configuration;
 }