internal void OnClientConnect(NewClientConnectedEventArgs e) { if (NewClientConnect != null) { NewClientConnect.Invoke(this, e); } }
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"); }
private void Server_NewClientConnect(object sender, NewClientConnectedEventArgs e) { IncommingConnection(e.ClientGuid); }