public string Read(ChannelBuffer buf, byte separator)
{
int count = buf.BytesBefore(separator);
if (count < 0)
{
return(null);
}
byte[] data = new byte[count];
buf.ReadBytes(data);
buf.ReadByte(); // get rid of separator
return(Encoding.UTF8.GetString(data));
}