예제 #1
0
        public DMEObject ReserveDMEObject(MediusServerSessionBeginRequest request)
        {
            var dme = new DMEObject(request);

            dme.BeginSession();
            Program.Manager.AddDmeClient(dme);
            return(dme);
        }
예제 #2
0
        public DMEObject(MediusServerSessionBeginRequest request)
        {
            ApplicationId = request.ApplicationID;
            Port          = request.Port;

            // Generate new session key
            SessionKey = Program.GenerateSessionKey();

            // Generate new token
            byte[] tokenBuf = new byte[12];
            RNG.NextBytes(tokenBuf);
            Token = Convert.ToBase64String(tokenBuf);
        }
예제 #3
0
 public DMEObject(MediusServerSessionBeginRequest request) : base(null, request.ApplicationID, Program.GenerateSessionKey())
 {
     Port = request.Port;
 }