1

I want to programmatically sending (and processing the response) message. Instead of open cmd and type in the command manually:

  1. connecting to the server by using command telnet [server_address] [port_number]
  2. send a message
  3. processing the response and send a following message
  4. repeat step 3 ...

How can I achieve this by using c#?

Hp93
  • 1,349
  • 3
  • 14
  • 23
  • Based on a description you need regular console application. What exactly you want to automate? – Andrii Litvinov Apr 16 '17 at 16:28
  • 2
    This is a very vague question. What do you mean by "behave like the telnet command"? In what way should it behave like the telnet command? What do you want your application to actually *do*? – Tanner Swett Apr 16 '17 at 20:43
  • Probably you looking for smtng like this: http://stackoverflow.com/questions/14359850/executing-commands-by-using-telnet-in-c-sharp – Vlad Apr 16 '17 at 22:02
  • so, basically you wish for an application that listen to a certain port and do something once someone send it a message..? – Bagus Tesa Apr 17 '17 at 03:46
  • @BagusTesa I was given a server that I can connect to and send/receive message using telnet. I want to automate the process instead of manually typing the command. I don't know how telnet works, that why I can't tell exactly what I need. – Hp93 Apr 17 '17 at 04:05
  • @vladimirpanf that is what I need, if you post your comment as an answer, I can vote for it – Hp93 Apr 17 '17 at 04:08

1 Answers1

0

Telnet library url: http://www.codeproject.com/KB/IP/MinimalisticTelnet.aspx

Previous thread: Executing commands by using Telnet in C#

Cheers.

Community
  • 1
  • 1
Vlad
  • 86
  • 5