How can I embed a telnet session into my app?


Last Updated:

  1. c4akarl

    c4akarl Member This Topic's Starter

    Joined:
    Jul 21, 2010
    Messages:
    10
    Likes Received:
    0
    Hi,

    I have now published my first app on market:
    http://androidforums.com/application-announcements/132492-chess-all-lite-my-first-android-app.html

    The next feature I am trying to install is a connection to a chess server.
    The Free Internet Chess Server (FICS) offers a connection with telnet.
    I was trying that with a simple Command Promt window on my PC:

    *********************************************************************************
    C:\>telnet freechess.org


    _ __ __ __
    | | / /__ / /________ ____ ___ ___ / /_____
    | | /| / / _ \/ / ___/ __ \/ __ `__ \/ _ \ / __/ __ \
    | |/ |/ / __/ / /__/ /_/ / / / / / / __/ / /_/ /_/ /
    |__/|__/\___/_/\___/\____/_/ /_/ /_/\___/ \__/\____/
    ^^__ _____________________ _ _ _
    / - \_ / ____/ _/ ____/ ___/ _ | || || |
    <| __< / /_ / // / \__ \ (_) |_______|
    <| \ / __/ _/ // /___ ___/ / _ \__ ___ /
    <| \ /_/ /___/\____//____/ (_) |___|_|
    <|______\ |_|___|
    _|____|_ ====================================== |___|_|
    (________) freechess.org ---- (_______)
    /________\ ====================================== /_______\
    (Login screen designed by Alefith)

    ****** Welcome to the Free Internet Chess Server at freechess.org ******

    Webpage: Free Internet Chess Server (FICS)
    Head admin : Chessty Complaints to : complaints@freechess.org
    Server location: freechess.org Server version : 1.25.17

    If you are not a registered player, enter guest or a unique ID.
    (If your return key does not work, use cntrl-J)

    login: guest

    Logging you in as "GuestVGMZ"; you may use this name to play unrated games.
    (After logging in, do "help register" for more info on how to register.)

    Press return to enter the server as "GuestVGMZ":

    *******************************************************************************

    How can I get a telnet connection to FICS in my chess app?

    Thanks for your help,
    Karl
     

    Advertisement
  2. jonbonazza

    jonbonazza Well-Known Member

    Joined:
    Jul 13, 2010
    Messages:
    1,934
    Likes Received:
    458
    You *probably* need root access to use telnet.
     
  3. markb

    markb Well-Known Member

    Joined:
    Sep 14, 2009
    Messages:
    148
    Likes Received:
    26
    telnet is just a socket connection using port 23.
    Why would you need root access for that?

    What you do with that socket connection depends on exactly what you want to use telnet for.
    Do you want to give your user a command prompt, as if they were running telnet themselves? Or do you want to programatically send commands and read the responses?
     
  4. c4akarl

    c4akarl Member This Topic's Starter

    Joined:
    Jul 21, 2010
    Messages:
    10
    Likes Received:
    0
    I only want to programatically send commands and read the responses!
     

Share This Page

Loading...