Thread: My "Telnet" server

  1. #1
    C++ Enthusiast jmd15's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    532

    My "Telnet" server

    I'm making a program with winsock, which is somewhat like a telnet server. I am making it so I can perform some commands on my other computer while downstairs on the other computer. I don't just want to download a telnet server, it's more fun to make one. Anyways, I have it accept the connection, send a greeting, and wait for data to be received. I used telnet to connect to it, received the greeting, then tried to type something but it only accepted ONE character and my server came up with the message acknowledging that I sent data to it. I am using the recv() function to receive data, why and how can I make it receive a string of text(or a line of text)? Remember, I am using Telnet to connect to this, so if telnet sends data after a I type a single character how can I ignore this or get around it?
    Trinity: "Neo... nobody has ever done this before."
    Neo: "That's why it's going to work."
    c9915ec6c1f3b876ddf38514adbb94f0

  2. #2
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    telnet sends charactors as you type them and it sends a \r\n at the end of each line. So keep receiving charactors and check for the \r\n before responding.

  3. #3
    C++ Enthusiast jmd15's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    532
    Gotcha, that's what I needed. Thanks.
    Trinity: "Neo... nobody has ever done this before."
    Neo: "That's why it's going to work."
    c9915ec6c1f3b876ddf38514adbb94f0

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. server client application - (i really need your help)
    By sarahnetworking in forum C Programming
    Replies: 3
    Last Post: 03-01-2008, 10:54 PM
  2. Server Architecture
    By coder8137 in forum Networking/Device Communication
    Replies: 2
    Last Post: 01-29-2008, 11:21 PM
  3. Where's the EPIPE signal?
    By marc.andrysco in forum Networking/Device Communication
    Replies: 0
    Last Post: 12-23-2006, 08:04 PM
  4. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 05:31 PM
  5. socket question
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 07-19-2002, 01:54 PM