G
Guest
Hi
I need a TCPListener and a TCPClient to communicate correctly
TCPListener sends this
string strData = "ABC"
byte[] data = Encoding.ASCII.GetBytes(strData)
s.Send(data, data.Length,0)
TCPClient receives
Byte[] read = new Byte[32]
String Data = Encoding.ASCII.GetString(read)
When I print the result in a textBox/messageBox it look like this: ABC
but if I try to test i
if(Data=="ABC"
it never works
I believe it has to do with the string -> charArray -> byte[] -> string formatting, but can't figure it out..
Please help
Thanks
I need a TCPListener and a TCPClient to communicate correctly
TCPListener sends this
string strData = "ABC"
byte[] data = Encoding.ASCII.GetBytes(strData)
s.Send(data, data.Length,0)
TCPClient receives
Byte[] read = new Byte[32]
String Data = Encoding.ASCII.GetString(read)
When I print the result in a textBox/messageBox it look like this: ABC
but if I try to test i
if(Data=="ABC"
it never works
I believe it has to do with the string -> charArray -> byte[] -> string formatting, but can't figure it out..
Please help
Thanks