예제 #1
0
        private static bool handleApplications(ClientSession session)
        {
            DatabaseQuerier      db   = new DatabaseQuerier(con);
            ApplicationsResponse resp = new ApplicationsResponse(db.getApplications(session.loginUsername.name));

            byte[] payLoad = MessageUtils.SerializeMessage(resp).GetAwaiter().GetResult();
            session.Client.Client.Send(payLoad);
            return(true);
        }
예제 #2
0
 static MessageHandler()
 {
     con = databaseInitializer.makeConnection();
     db  = new DatabaseQuerier(con);
 }