public override void Oneway(Command command)
{
// Disable inactivity monitoring while processing a command.
//synchronize this method - its not synchronized
//further down the transport stack and gets called by more
//than one thread by this class
lock(inWrite)
{
inWrite.Value = true;
try
{
if(failed.Value)
{
throw new IOException("Channel was inactive for too long: " + next.RemoteAddress.ToString());
}
if(command.IsWireFormatInfo)
{
lock(monitor)
{
localWireFormatInfo = command as WireFormatInfo;
StartMonitorThreads();
}
}
next.Oneway(command);
}
finally
{
commandSent.Value = true;
inWrite.Value = false;
}
}
}