Abstractions.Pipes.Pipe.HandlePipeConnection C# (CSharp) Method

HandlePipeConnection() protected method

protected HandlePipeConnection ( BinaryReader reader, BinaryWriter writer, object>.IDictionary initialMessage ) : void
reader System.IO.BinaryReader
writer System.IO.BinaryWriter
initialMessage object>.IDictionary
return void
        protected void HandlePipeConnection(BinaryReader reader, BinaryWriter writer, IDictionary<string, object> initialMessage)
        {
            try
            {
                // If we should announce with a specific message, do so
                if (initialMessage != null)
                {
                    WriteMessage(writer, initialMessage);
                }

                // So long as our Func<> returns true, we keep going.  When it returns false,
                //  it is done and its time to closeup and look for another client.
                while (StreamAction(reader, writer)) { }
            }
            catch (IOException)
            {
                throw;
            }
            catch(Exception e)
            {
                LibraryLogging.Error("Error while using pipe connection: {0}", e);
            }
        }