Now I want to do the same from my c# code. I have written the following code:
TcpClient tcpclient = new TcpClient();
tcpclient.Connect(
NetworkStream ns = tcpclient.GetStream();
StreamReader streamReader = new StreamReader(ns);
byte[] msg = Encoding.ASCII.GetBytes("type
string returnd = Encoding.ASCII.GetString(msg);
ns.Write(msg, 0, msg.Length);
StreamWriter streamWriter = new St byte[] bytes = new byte[tcpclient.ReceiveBufferSize];
int bytesread = tcpclient.ReceiveBufferSize;
ns.Read(bytes, 0, bytesread);
reamWriter(ns);
string returndata = Encoding.ASCII.GetString(bytes);
but my code is always giving some junk output like " ÿý%ÿûÿûÿý'ÿýÿý"
Replies
Know the answer? Post it — somebody with the same question will find it here.