2
0

events.pl 401 B

1234567891011121314151617181920212223
  1. require ESL;
  2. my $con = new ESL::ESLconnection("localhost", "8021", "ClueCon");
  3. $con->events("plain", "all");
  4. while($con->connected()) {
  5. #my $e = $con->recvEventTimed(100);
  6. my $e = $con->recvEvent();
  7. if ($e) {
  8. #print $e->serialize();
  9. my $h = $e->firstHeader();
  10. while ($h) {
  11. printf "Header: [%s] = [%s]\n", $h, $e->getHeader($h);
  12. $h = $e->nextHeader();
  13. }
  14. }
  15. }