#1
  1. No Profile Picture
    SourceSkipper
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Location
    Atlanta, GA.
    Posts
    1
    Rep Power
    0

    Question Client/Server Question


    <b>Statement</b>

    I'm creating a client/server chat program on my Linux system. It's a group chat like ICQ, so all messages go through the server and then to then broadcast to online users. Note: for the time being, this program will operate in a <b>terminal/console</b>, so no gui.

    <b>Problem</b>

    The client program continuously asks for 'raw_input' from the user,and then sends the msg to the server to be broadcasted. However, I can't output messages to the terminal/console, if the client program is waiting for input. What happens is that after the client types a message. All previous output(of other users) are then flush to that client's screen. In other words, how do i get client input and display current messages to the client's
    screen without having to wait for the clients input. NOte: this is a terminal.

    Telnet does it some kinda way(it works perfect), but i'm trying to get my client to work the same way.

    Comments on this post

    • JimmyGosling agrees
  2. #2
  3. No Profile Picture
    Python Prophet
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    Amersfoort, The Netherlands
    Posts
    45
    Rep Power
    13
    I'm not really sure, I've never had to use it this way, but I guess you could use the curses module: Documentation and an HOWTO.
    Some people, when confronted with a problem, think I know, I'll use regular expressions. Now they have two problems. - Jamie Zawinski, in comp.lang.emacs
  4. #3
  5. No Profile Picture
    SourceSkipper
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Location
    Atlanta, GA.
    Posts
    1
    Rep Power
    0

    Smile I've got it now


    I'll just make use of python select() method...
  6. #4
  7. No Profile Picture
    Python Prophet
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    Amersfoort, The Netherlands
    Posts
    45
    Rep Power
    13
    Okay, cool.

    /me learned something new
    Some people, when confronted with a problem, think I know, I'll use regular expressions. Now they have two problems. - Jamie Zawinski, in comp.lang.emacs

IMN logo majestic logo threadwatch logo seochat tools logo