Example #1
0
        /// <summary> Close the Channel.  The channel is only closed, it is
        /// the responsibility of the "closer" to remove the channel from
        /// the channel table.
        /// </summary>

        internal virtual void Close()
        {
            IOException ex = null;

            if (input != null)
            {
                try
                {
                    input.close();
                }
                catch (IOException e)
                {
                    ex = e;
                }
                input = null;
            }

            if (output != null)
            {
                try
                {
                    output.close();
                }
                catch (IOException e)
                {
                    ex = e;
                }
                output = null;
            }

            if (ex != null)
            {
                throw ex;
            }
        }
Example #2
0
        /// <summary> Setup the TclInputStream on the first call to read</summary>

        protected internal void initInput()
        {
            if (input != null)
            {
                return;
            }

            input             = new TclInputStream(InputStream);
            input.Encoding    = encoding;
            input.Translation = inputTranslation;
            input.EofChar     = inputEofChar;
            input.Buffering   = buffering;
            input.BufferSize  = bufferSize;
            input.Blocking    = blocking;
        }