Send Hex Decimal over TCP / IP
<p>Im Developing a client to send information to a specific server. And the server accept only a spesific data from the client. The Data is "163130303030323030fc". I have converted it into Ascii as </p>

<blockquote>
  <p>"SYN10000200ü"</p>
</blockquote>

<p>it works except "SYN". The "SYN" has to be converted to "16" to make it happen. But when I use the code <code>Encoding.Default.GetBytes("&lt;SYN&gt;10000200ü")</code> the result receive as </p>

<blockquote>
  <p>3c53594e3e3130303030323030fc</p>
</blockquote>

<p>The code Im Using Is as follows ,</p>

<pre><code>  Dim tcpClient As New System.Net.Sockets.TcpClient()
    Try
        tcpClient.Connect("192.168.18.6", 60010)
        Dim networkStream As NetworkStream = tcpClient.GetStream()
        If networkStream.CanWrite And networkStream.CanRead Then




            Dim sendBytes As Byte() = Encoding.Default.GetBytes("&lt;SYN&gt;10000200ü")
            networkStream.Write(sendBytes, 0, sendBytes.Length)

            Do
            Loop Until networkStream.DataAvailable
            Dim bytes(tcpClient.ReceiveBufferSize) As Byte
            networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize))
            Dim returndata As String = Encoding.ASCII.GetString(bytes)
            TextBox1.Text &amp;= returndata
            tcpClient.Close()
        Else
            If Not networkStream.CanRead Then
                tcpClient.Close()
            Else
                If Not networkStream.CanWrite Then
                    tcpClient.Close()
                End If
            End If
        End If
    Catch ex As Exception
        MsgBox(ex.ToString)
    End Try
</code></pre>

<p>It ok if there's a way to send the data in hex without encording to ascii 
<a href="https://i.stack.imgur.com/qWT6P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qWT6P.png" alt="enter image description here"></a></p>

<p>Your kind Consideration is highly appreciated !</p>