AnyEvent :: ÇÚµé

ÆÄÀÏ ÇÚµé ON ÆÄÀÏ ÇÚµé ANYEVENT
Áö±Ý ´Ù¿î·Îµå

AnyEvent :: ÇÚµé ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • Perl Artistic License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Marc Lehmann
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://www.goof.com/pcg/marc/

AnyEvent :: ÇÚµé ű×


AnyEvent :: ÇÚµé ¼³¸í

ÆÄÀÏÀÇ ºñ Â÷´Ü I / O AnyEvent¸¦ ÅëÇØ ÇÚµé AnyEvent :: HandleÀº ÆÄÀÏ Çڵ鿡¼­ À̺¥Æ® ±â¹Ý I / O¸¦º¸´Ù ½±°Ô ¼öÇà ÇÒ ¼ö ÀÖµµ·Ï µµ¿ì¹Ì ¸ðµâ·Î ¼³°èµÈ Perl Ŭ·¡½ºÀÔ´Ï´Ù. ºñ Â÷´ÜÀ» ¼öÇàÇϱâÀ§ÇÑ À¯Æ¿¸®Æ¼ ÇÔ¼ö´Â ¼ÒÄÏ¿¡ ¿¬°áÇÏ°í ¼ö¶ôÇÕ´Ï´Ù. AnyEvent :: Util. AnyEvent :: INTRO Tutorial¿¡´Â AnyEvent :: ÇÚµé ¿¹Á¦°¡ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù. ´ÙÀ½¿¡¼­ ¹®¼­°¡ "¹ÙÀÌÆ®"¸¦ ÂüÁ¶ÇÏ¸é ¹®ÀÚ¸¦ ÀǹÌÇÕ´Ï´Ù. SysRead ¹× Syswrite°¡ ¸ðµç I / O¿¡ »ç¿ëµÇ¹Ç·Î ¹®ÀÚ Ã³¸® °¡ÀÌ ¸ðµâ¿¡µµ Àû¿ëµË´Ï´Ù. ¸ðµç ÄݹéÀº ÇÚµé ¿ÀºêÁ§Æ®°¡ ù ¹ø° Àμö·Î ÇÚµé ¿ÀºêÁ§Æ®·Î È£ÃâµË´Ï´Ù. Synopsis´Â AnyEvent¸¦ »ç¿ëÇÕ´Ï´Ù. AnyEvent :: Handle; MY $ CV = AnyEvent-> Condvar; ³» $ handle = anyEvent :: handle-> new (fh => * stdin, on_eof => sub {$ cv-> send;},); # ÀϺΠ¿äû ¶óÀÎ $ handle-> push_write ( "getInfo1512"); # ÀÀ´ä ÁÙÀ» ÀÐÀ¸½Ê½Ã¿À $ handle-> push_read (line => sub {my ($ ÇÚµé, $ line) = @_; °æ°í "¶óÀÎ <$ line> "; $ cv-> send;}); $ cv-> recv; ¿ä±¸ »çÇ× : ¡¤ Perl.


AnyEvent :: ÇÚµé °ü·Ã ¼ÒÇÁÆ®¿þ¾î