Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

RFC: Bi-directional multi-client non-blocking TCP server/client

by glenn (Scribe)
on Oct 17, 2014 at 15:45 UTC ( [id://1104190] : perlmeditation . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use threads;
    use Thread::Queue;
    ...
        }
    });
    $com->enqueue("<message><to ip=\"IPADDR\"><data>INFO</data><anyfieldsy
    +ouwant>whatever</anyfieldsyouwant></message>");
    
  2. or download this
    package communication_server;
    
    ...
    #COMMUNICATION--------------------------------------------------------
    +----------------------------------
    
    1;
    
  3. or download this
    package communication_client;
    
    ...
    #COMMUNICATION--------------------------------------------------------
    +----------------------------------
    
    1;