public void Publish(string channel, LCMEncodable e)
{
if (this.closed)
{
throw new SystemException();
}
lock (this)
{
try
{
encodeBuffer.Reset();
e.Encode(encodeBuffer);
Publish(channel, encodeBuffer.Buffer, 0, encodeBuffer.Length);
}
catch (System.IO.IOException ex)
{
Console.Error.WriteLine("LC Publish fail: " + ex);
}
}
}