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);
}
}