Simple example
The example below shows the simplest possible XML datagram for transmitting a text message.
<TextMessage To="123456">Text to display</TextMessage>
C# code example:
using(var tcpClient = new TcpClient("127.0.0.1", 16969)) {
var datagram = System.Text.Encoding.ASCII.GetBytes(
"<TextMessage To=\"123456\">Text to display</TextMessage>");
var header = System.Text.Encoding.ASCII.GetBytes(
string.Format("PUT / IPA/1.0\nContent-Length: {0}\n\n", datagram.Length));
tcpClient.GetStream().Write(header, 0, header.Length);
tcpClient.GetStream().Write(datagram, 0, datagram.Length);
}