private void sendAuthResponce(AuthAction responce, IPEndPoint sender) { if (responce.Action == AuthType.Success) { var user = new PublicUser(sender, responce.Id.Value, responce.Nickname); if (Users.ContainsKey(sender)) { Console.WriteLine($"Multiple client access from ip " + sender); } else { Users.Add(sender, user); } } var buffer = responce.ToBytes(); _client.Send(buffer, buffer.Length, sender); }
private void sendAuthPacket(AuthAction packet) { var buffer = packet.ToBytes(); _client.Send(buffer, buffer.Length, _stanIP); }