/* * /// <summary> Throws an error if the input object types and output object types do not match * /// (This needs some more thinking about...) * /// </summary> * public void CheckTypes() * { * * return; * * if (senderTypes == null) return; * if (receiverType == Object.class) return; * Enumeration types = senderTypes.elements(); * while (types.hasMoreElements()) { * Class senderType = (Class)(types.nextElement()); * if (!(receiverType.isAssignableFrom(senderType))) * FlowError.complain("Connection type mismatch"); * } * * * } */ /// <summary>The close input connection function. /// </summary> //UPGRADE_NOTE: Synchronized keyword was removed from method 'close'. Lock expression was added. 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="jlca1027"' public void Close() { lock (this) { Trace("Close connection"); if (IsClosed()) { return; } _senderCount = 0; // set sender count to zero if (_buffer.Count() > 0) { Console.Out.WriteLine(_buffer.Count() + " packets on input connection lost"); } System.Threading.Monitor.PulseAll(this); // wakes up any senders waiting for slots } }