Re: Suggestions on how to handle this more efficiently

From: Materialised (materialised_at_ntlworld.com)
Date: 09/04/03

  • Next message: Dragan Cvetkovic: "Re: Suggestions on how to handle this more efficiently"
    Date: Thu, 04 Sep 2003 17:42:55 +0100
    
    

    Marc Rochkind wrote:
    > On Thu, 04 Sep 2003 16:54:54 +0100, Materialised
    > <materialised@ntlworld.com> wrote:
    >
    >> Hello everyone,
    >> I have just started programming in c on freeBSD. I have been reading
    >> Beej's Guide to network programming, and am currently developing my
    >> first program, a tcp based 1 on one chat client and server.
    >>
    >> I am looking for suggestions on how I can handle the sending and
    >> recieving of the strings differently, rather than having a continuous
    >> loop running through the program, as to me this doesnt seem very
    >> efficient.
    >>
    >
    > Can you be more specific about what it is that doesn't seem efficient to
    > you? That is, what is it that you are trying to minimize and what it is
    > about this program that you think isn't minimizing it.
    >
    > (The program as you have written it can block in various places, and
    > blocking, assuming that there is nothing else that the program can
    > usefully do, is very efficient.)
    >
    > --Marc
    I am just wondering if there is a more efficient way to handle the
    sending and recieving.
    At present the client only receives data after the user has sent data. I
    am wondering is there is a more "modular" (if that is the correct term
    to use for a c program) way to handle this, so that sending and
    receiving can happen symutaniously.


  • Next message: Dragan Cvetkovic: "Re: Suggestions on how to handle this more efficiently"