public DMEObject ReserveDMEObject(MediusServerSessionBeginRequest request) { var dme = new DMEObject(request); dme.BeginSession(); Program.Manager.AddDmeClient(dme); return(dme); }
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); }
public DMEObject(MediusServerSessionBeginRequest request) : base(null, request.ApplicationID, Program.GenerateSessionKey()) { Port = request.Port; }