I write the number to the byte array and then send the array to the socket to the client.
uint a = 1; byte[] b = BitConverter.GetBytes(a); handler.Send(b); But how to write several variables to an array of bytes, such as a string, uint, int, and others?