예제 #1
0
 internal void OnClientConnect(NewClientConnectedEventArgs e)
 {
     if (NewClientConnect != null)
     {
         NewClientConnect.Invoke(this, e);
     }
 }
예제 #2
0
        private static void Server_NewClient(object sender, NewClientConnectedEventArgs e)
        {
            var clientGuid = e.ClientGuid;

            foreach (var block in blockChain.Chain)
            {
                var obj = JsonConvert.SerializeObject(block);
                server.sendToSpesificClient(clientGuid.ToString(), obj);
                Thread.Sleep(100);
            }
            Console.WriteLine("Block chain sent to client");
        }
예제 #3
0
 private void Server_NewClientConnect(object sender, NewClientConnectedEventArgs e)
 {
     IncommingConnection(e.ClientGuid);
 }