/// <summary>registeres connections from received listen points. Those connections /// can be used for callbacks.</summary> /// <remarks>for use case (1)</remarks> internal void RegisterBidirectionalConnection(GiopConnectionDesc receivedOnDesc, Array receivedListenPoints) { // ask transport factory to create the connection key for the listenPoints for (int i = 0; i < receivedListenPoints.Length; i++) { string conKey = m_transportFactory.GetEndPointKeyForBidirEndpoint(receivedListenPoints.GetValue(i)); if (conKey != null) { lock (this) { if (!IsBidirConnectionAlreadyRegistered(conKey, receivedOnDesc)) { // new / different connection for listen-point GiopBidirInitiatedConnection connection = new GiopBidirInitiatedConnection(conKey, receivedOnDesc.TransportHandler, this); Trace.WriteLine(String.Format("register bidirectional connection to {0}", conKey)); IList cons = (IList)m_bidirConnections[conKey]; if (cons == null) { cons = new ArrayList(); m_bidirConnections[conKey] = cons; } cons.Add(connection); RegisterConnection(conKey, connection); // register the new connection SetConnectionAvailable(conKey, connection); } else { Trace.WriteLine(String.Format("received listen points for already registered bidirectional connection to {0}", conKey)); } } } } }
/// <summary>registeres connections from received listen points. Those connections /// can be used for callbacks.</summary> /// <remarks>for use case (1)</remarks> internal void RegisterBidirectionalConnection(GiopConnectionDesc receivedOnDesc, Array receivedListenPoints) { // ask transport factory to create the connection key for the listenPoints for (int i = 0; i < receivedListenPoints.Length; i++) { string conKey = m_transportFactory.GetEndPointKeyForBidirEndpoint(receivedListenPoints.GetValue(i)); if (conKey != null) { lock(this) { if (!IsBidirConnectionAlreadyRegistered(conKey, receivedOnDesc)) { // new / different connection for listen-point GiopBidirInitiatedConnection connection = new GiopBidirInitiatedConnection(conKey, receivedOnDesc.TransportHandler, this); Trace.WriteLine(String.Format("register bidirectional connection to {0}", conKey)); IList cons = (IList)m_bidirConnections[conKey]; if (cons == null) { cons = new ArrayList(); m_bidirConnections[conKey] = cons; } cons.Add(connection); RegisterConnection(conKey, connection); // register the new connection SetConnectionAvailable(conKey, connection); } else { Trace.WriteLine(String.Format("received listen points for already registered bidirectional connection to {0}", conKey)); } } } } }