Closed amaury1093 closed 6 years ago
Hello @amaurymartiny ! Sorry for answering your question so late. I was so busy this month.
I have looked into your problem and found the source. Basically, you use TelnetConnection
in the correct way. The problem is that you missed the newline character (\n) in your write_buffer
. So, you can fix the problem by simply adding a \n
at the end of the buffer:
let write_buffer = "HELO Hi\n".as_bytes();
This should be enough to make the program run. If you encounter more problems, please let me know.
BTW, I still found some other problems in my code when I was finding the problem. For example, I think that it lacks a flush()
to ensure that the connection sends the data we write. Thanks for giving me a chance to review my code.
Thanks, that solved it!
I'm creating a telnet connection to google's smtp server.
I wish to write a telnet message after I get some data. I.e. If I receive this data, then I write that message.
However, here I am writing "HELO Hi", with no response.