| POE :: Component :: LightSpeed. POE :: ±¸¼º ¿ä¼Ò :: LightSpeed - IKC2ÀÇ ROMPing ±Ù°Å. |
Áö±Ý ´Ù¿î·Îµå |
POE :: Component :: LightSpeed. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~apocal/
POE :: Component :: LightSpeed. ű×
POE :: Component :: LightSpeed. ¼³¸í
PoE :: Component :: LightSpeed - IKC2ÀÇ Romping ±Ù°Å. PoE :: Component :: Lightspeed - IKC2.SynopsisÀÇ Romping ±Ù°Å´Â PoE¸¦ »ç¿ëÇÕ´Ï´Ù. POE :: Component :: LightSpeed :: Client; # »õ Ŭ¶óÀ̾ðÆ® ¼¼¼Ç PoE :: ±¸¼º ¿ä¼Ò :: LightSpeed :: Ŭ¶óÀ̾ðÆ® -> ½ºÆù ( 'Ä¿³Î'=> 'Å×½ºÆ® ¹Ú½º', 'ÁÖ¼Ò'=> '192.168.1.100',); # LightSpeed PoE :: Session-> Create (inline_states => {_start => sub {$ _ -> ALIAS_SET ( 'mySESSION')¿Í Åë½ÅÇϱâ À§ÇØ ÀÚü ¼¼¼ÇÀ» ¸¸µì´Ï´Ù. # ¿¹, "¸ð´ÏÅÍ"ÇÏ´Â ´õ ÁÁÀº ¹æ¹ý Lightspeed´Â ... # Áö±Ý ´çÀå $ _ -> delayset ( 'do_stuff', 5)À» ¿¬°áÇÏ´Â µ¥ ¾à°£ÀÇ ½Ã°£À»ÁֽʽÿÀ. # lightspeed ÇØÄ¿ µ¥¸ð $ _ -> delay_set ( ' È¥¶õ ½º ·¯ ¿ö ', 1);},'do_stuff '=> sub {perfect $ _ -> Æ÷½ºÆ® ('poe : // otherbox / mysession / ping ','´ç½ÅÀº ¾î¶°¼¼¿ä? ') # Ʋ¸° # $ $ _ -> Æ÷½ºÆ® ( 'PoE : // ´Ù¸¥ »óÀÚ / mySession', 'ÇÎ', '´ç½ÅÀº "´ç½ÅÀÌ ¾î¶°¼¼¿ä?');}, 'pong'=> sub {print"´Â "$ _ -> ID. "n";}, 'È¥¶õ½º·¯¿î'=> Sub {#ÀºÀÌ LightSpeed ¼¼¼ÇÀԴϱî? ($ _ -> is_lightspeed) {# yay! Àμâ "¹ÞÀº LightSpeed ¿äû : ' ";} else {print"·ÎºÎÅÍ ' ";} $ _ -> id."'state '. $ _ ¸¦ ÀμâÇϽʽÿÀ. "'ÆÄÀÏ '". $ _ . " '¼±'". $ _ . "n";},); --------- PoE¸¦ »ç¿ëÇϽʽÿÀ; POE :: Component :: LightSpeed :: Server; # »õ ¼¹ö ¼¼¼Ç PoE :: ±¸¼º ¿ä¼Ò :: LightSpeed :: Server-> Spawn ( 'Ä¿³Î'=> '±âŸ ¹Ú½º', 'ÁÖ¼Ò'=> '192.168.1.100'); # lightspeed poe :: session-> create (inline_states => {_start => sub {$ _ -> ALIAS_SET ( 'mySESSION');}, ping '=> SUB {print ". $ _ -> id."-> ". $ _ ."n "; # ¿Ïº®ÇÑ $ _ -> Æ÷½ºÆ® ($ _ , 'pong', 'wassup!'); $ _ -> Æ÷½ºÆ® ($ _ -> ID, 'Æþ', 'WAZZUP!'); # À߸øµÈ # $ _ -> Æ÷½ºÆ® ( "$ _ ", 'ping', 'wassup!'); lightspeed ÇØÄ¿ÀÇ µ¥¸ð $ _ -> °Ô½Ã¹° ( 'poe : // testbox / mysession / È¥¶õ½º·¯¿ö', 'ÀÀ!') ;},},); ¿ä±¸ »çÇ× : ¡¤ PerlwhatÀÌ ¸±¸®½ºÀÇ »õ·Î¿î ±â´É : ¡¤ PoE-0.3101 Áö¿ø ¡¤ ¸ðµâÀÇ ¹üÀ§ ¹öÀüÀÌ ³·Àº Àε¦¼°¡ ³·Àº ¹öÀüÀ¸·Î ºÒÆòÇÏÁö ¾ÊÀ» °ÍÀÔ´Ï´Ù.
POE :: Component :: LightSpeed. °ü·Ã ¼ÒÇÁÆ®¿þ¾î