Hi, I need to be able to get some data from a telnet session to verify a login. There server I wish tot telnet with is a SMTP server. I already have code in place to send commands to the server and to allow me to connect to it via sockets.
So far the only thing I have come up with is:
-
//s being my open socket...
-
Stream q = new NetworkStream(s);
-
StreamReader sr = new StreamReader(q);
-
string output = sr.ReadLine();
-
However, this freezes when it trys to ReadLine();. Would someone be able to give me a push in the right direction? Ive done some Google searches but they all seem to do it the same or similar ways. And each way I try still freezes. VS2003 output windows has the reply from the server so I know there is a reply there I just can’t get at it.
All help is much appreciated.
Thanks,
Piercy