brotherTwitch has asked for the wisdom of the Perl Monks concerning the following question:

Hail and Well Met, Fellow Monksters! I am attempting to set up some biderectional communications between multiple clients and a non-forking tcp server. I need to pass ascii text back and forth between the clients by way of the server (kinda like a chat server I guess, but not necesarily for that purpose). I am using some code from ppgs 628-631 of the Book of the Ram, and I seem to have totally missed the point somewhere; if anyone could offer an interpretation of the code presented there (especially the part about flushing buffers - mine seem clogged :), it would be greatly appreciated. Thank You All and Good Day! -brotherTwitch
  • Comment on Questions about non-forking servers/clients

Replies are listed 'Best First'.
Re: Questions about non-forking servers/clients
by jepri (Parson) on Apr 01, 2002 at 12:38 UTC
    you'd have to post the code - not all of us have 'the Ram', although some of us seem to have the gyp :)

    The trick with buffers is that Perl, and your OS will hold onto stuff you try to send until there's enough of it to be worth sending as a chunk, or until your program quits. Since your server program won't quit, both server and client will sit there waiting for the other to talk.

    ____________________
    Jeremy
    I didn't believe in evil until I dated it.