G
Guest
Hi,
I am trying to build a SNMP application using VB .NET. I am using the
udpClient class to send and receive data.
The SNMP header when viewed in hex looks like :: 7E 05 13 C1 ........ 7E
My problem is the following. Udpclient's send method requires a byte array.
So I tried
Dim MyByte = ASCII.GetBytes(strPDU)
udpClient.Send(MyByte, MyByte.Length, sRemoteHost, sRemotePort)
However on the receiving end instead of getting (shown as hex) 7E 05 13 C!,
I get 7E 05 13 3F.
Now I understand that ascii support is only upto 127 and thats why this is
happening.
What is a better way of accomplishing this? I have tried looking at
udpClient samples in the documentation and on the web but they all use
ASCII.GetBytes method.
Thanks in advance
Pete.
I am trying to build a SNMP application using VB .NET. I am using the
udpClient class to send and receive data.
The SNMP header when viewed in hex looks like :: 7E 05 13 C1 ........ 7E
My problem is the following. Udpclient's send method requires a byte array.
So I tried
Dim MyByte = ASCII.GetBytes(strPDU)
udpClient.Send(MyByte, MyByte.Length, sRemoteHost, sRemotePort)
However on the receiving end instead of getting (shown as hex) 7E 05 13 C!,
I get 7E 05 13 3F.
Now I understand that ascii support is only upto 127 and thats why this is
happening.
What is a better way of accomplishing this? I have tried looking at
udpClient samples in the documentation and on the web but they all use
ASCII.GetBytes method.
Thanks in advance
Pete.