Good Evening Monks, I've been playing arround with Tk for a while and I came up with a working prototype of a POS (Point of Sale) which I use for couple of months in couple of restaurants (http://butchersgrill.com/software/opentill.jpg)... However - In my scenario my server is plain (no GUI) Perl application that is forking for each of my clients... Socket that listens for the connections from my POS clients... The problem that I have is that the comunication is only one way - which means that I don't have socket that listens on the Tk (client) side. So shorter - I do the following: Client sends request to the server and gets reply from the server. I just want to add to this - "Server sends request to the client and client answers" ie... full duplex comunication. My problem is that Tk has got it's own event loop - so I can not have something like "while(1) ..." in the Tk program. I tried using POE with Filter::Reference and Socket Wheel on top of Tk... but it slows down my comunication speed dramticaly... For example my server response time jumped from 0.0001 seconds to 0.3 / 0.4 seconds - which is unaceptable for me. I tried everything - but it looks that I am not lucky. Can you please help me. In two words - I need Tk application example for a program that acts as a client and a server in a non-blocking manner using either Fork or Threads, something that will run fine on Active State Perl. I can not afford using IO::Select because of the server multitasking required... Thank you for your expertise.

In reply to Listening Socket in Tk by avo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.