public override void CreateSession(ISessionPushPrx proxy, Current current = null) { if (!(current.con.getInfo() is Ice.TCPConnectionInfo connection)) { logger.error($"A ## Type of current.con is not TCPConnectionInfo!!!"); return; } var session = new SessionI(proxy); // Never close this connection from the client and turn on heartbeats with a timeout of 30s current.con.getInfo().connectionId = session.Id; current.con.setACM(30, ACMClose.CloseOff, ACMHeartbeat.HeartbeatAlways); current.con.setCloseCallback(_ => DestroySessionCallback(session)); IceFrontSessionExtensions.sessions.TryAdd(session.Id, session); logger.print($"Create session :{session.Id},{serverName}"); }
public SessionI(ISessionPushPrx proxy) { this.Id = $"__{(++sss)}__"; //下滑线防止与绑定标识符撞衫 this.SessionPushPrx = proxy; }