I am needing to translate this code to add a big endian 2 byte header. It works now without header but I am a little lost on how to add it.
TcpClient client = new TcpClient(ipNum, portNum);
NetworkStream nw = client.GetStream();
byte[] send = Encoding.UTF8.GetBytes(userInput);
Console.WriteLine("Sending : " + userInput);
nw.Write(send, 0, send.Length);
byte[] readBytes = new byte[client.ReceiveBufferSize];
int bytesRead = nw.Read(readBytes, 0, client.ReceiveBufferSize);
Console.WriteLine("Received : " + Encoding.UTF8.GetString(readBytes 0, readBytes);