The exception says Root Element is not found. Since your are using XmlSerialization you need to set the RootNode. change the serializable class as below
[Serializable]
[XmlRoot]
public class SendObj1
{
[XmlElement]
public int cmd = 0;
[XmlElement]
public string msg = string.Empty;
}
/EDIT
The deserialization part is incomplete, you need to pass the buffer to memory stream before deserialize the stream
XmlSerializer xs = new XmlSerializer(typeof(SendObj1));
MemoryStream ms = new MemoryStream(buffer);
obj = (SendObj1) xs.Deserialize(ms);
msg = obj.msg;
cmd = obj.cmd;