public ClientState(Socket socket) { try { m_Socket = socket; m_ClientIdentifier = Guid.NewGuid().ToString(); m_AesModule = new AesModule(); m_MessageIsolator = new MessageIsolator(this, m_AesModule); m_AsyncCallback = new AsyncCallback(ReadCallback); NetworkEventDispatcher. InvokeClientConnectionEvent(new ClientConnectionEventArgs(this)); Socket.BeginReceive (Buffer, 0, BufferSize, 0, m_AsyncCallback, this); } catch (Exception e) { Console.WriteLine(e.ToString()); } }
private static void InitializeModules() { RsaKeysLoaded = RSAModule.QueryRsa(); m_AesModule = new AesModule(); m_AesModule.InitializeProviderFromFile(); MySqlConnector.InitializeMySqlPasswordFromEncrypted(); MySqlConnection SqlConnection = MySqlConnector.InitializeMySqlConnection(); if (SqlConnection != null) { SqlConnection.Dispose(); Console.WriteLine ("Mysql Database Connection Sucessful.."); } }
public MessageIsolator(ClientState state, AesModule aes) { m_ClientState = state; m_Aes = aes; }