/// <summary> /// The CreateSession method creates a new instance of /// an IPC handler session that the server endpoint will /// manage for multiplexing IPC events to and from a peer /// that has connected to the endpoint. /// </summary> /// <returns></returns> public IVfxIpcSession CreateSession() { // REC: Create a new instance of an IPC session: VfxTcpServerSession result = new VfxTcpServerSession(System.Guid.NewGuid()); // REC: Add the new session to the local map: _mapSessions.Add(result.InstanceId.ToString(), result); // REC: Bind to the session's event dispatcher: result.EventDispatch += HandleDispatch; // REC: Return the IPC session handler to the acceptor // which will then initialize and activate it: return(result); }
/// <summary> /// The CreateSession method creates a new instance of /// an IPC handler session that the server endpoint will /// manage for multiplexing IPC events to and from a peer /// that has connected to the endpoint. /// </summary> /// <returns></returns> public IVfxIpcSession CreateSession() { // REC: Create a new instance of an IPC session: VfxTcpServerSession result = new VfxTcpServerSession(System.Guid.NewGuid()); // REC: Add the new session to the local map: _mapSessions.Add(result.InstanceId.ToString(), result); // REC: Bind to the session's event dispatcher: result.EventDispatch += HandleDispatch; // REC: Return the IPC session handler to the acceptor // which will then initialize and activate it: return result; }