http :: daemon.

HTTP :: DAEMONÀº °£´ÜÇÑ HTTP ¼­¹ö Ŭ·¡½ºÀÔ´Ï´Ù.
Áö±Ý ´Ù¿î·Îµå

http :: daemon. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • Perl Artistic License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Gisle Aas
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://search.cpan.org/~gaas/

http :: daemon. ű×


http :: daemon. ¼³¸í

http :: daemonÀº °£´ÜÇÑ HTTP ¼­¹ö Ŭ·¡½ºÀÔ´Ï´Ù. http :: daemonÀº °£´ÜÇÑ HTTP Server Ŭ·¡½ºÀÔ´Ï´Ù. HTTP :: DAEMONÀ» »ç¿ëÇÕ´Ï´Ù. http :: status; ³» $ d = http :: daemon-> new || ÁÖ»çÀ§; Àμâ "AT : N"¿¡¼­ Àú¿¡°Ô ¿¬¶ôÇϽʽÿÀ. while (my $ c = $ d-> ¼ö¶ô) {while (my $ r = $ c-> get_request) {($ r-> ¸Þ¼Òµå Eq 'get'¹× $ r-> url-> °æ·Î Eq "/ xyzzy ") {# ±â¾ïÇϽʽÿÀ, ÀÌ°ÍÀº * ±ÇÀå ½Ç½À :-) $ c-> send_file_response ("/ etc / passwd "); } else {$ C-> send_error (rc_forbidden)}} $ c-> ´Ý±â; Undef ($ c); } http :: daemon Ŭ·¡½ºÀÇ ÀνºÅϽº´Â µé¾î¿À´Â ¿äû¿¡ ´ëÇÑ ¼ÒÄÏÀ» ûÃëÇÏ´Â HTTP / 1.1 ¼­¹öÀÔ´Ï´Ù. http :: daemonÀº io :: socket :: inetÀÇ ÇÏÀ§ Ŭ·¡½ºÀ̹ǷΠSocket ÀÛ¾÷À» Á÷Á¢ ¼öÇà ÇÒ ¼ö ÀÖ½À´Ï´Ù. COFF (accept) ¸Þ¼Òµå´Â Ŭ¶óÀ̾ðÆ®ÀÇ ¿¬°áÀ» »ç¿ëÇÒ ¼öÀÖÀ» ¶§ ¸®Åϵ˴ϴÙ. ¹Ýȯ µÈ °ªÀº http :: daemon :: clientconn object°¡ ´Ù¸¥ io :: socket :: inet subclassÀÔ´Ï´Ù. ÀÌ °³Ã¼¿¡¼­ get_request () ¸Þ¼Òµå¸¦ È£ÃâÇϸé Ŭ¶óÀ̾ðÆ®¿¡¼­ µ¥ÀÌÅ͸¦ Àаí http :: Request °´Ã¼¸¦ ¹ÝȯÇÕ´Ï´Ù. ClientConn °³Ã¼´Â ´Ù¾çÇÑ ÀÀ´äÀ» ´Ù½Ã º¸³»´Â ¸Þ¼­µå¸¦ Á¦°øÇÕ´Ï´Ù.ÀÌ HTTP µ¥¸óÀº Æ÷Å© (2)¸¦ Æ÷Å©ÇÏÁö ¾Ê½À´Ï´Ù. ±ÍÇÏÀÇ ½Åû, Áï, http :: µð¸Õ »ç¿ëÀÚ´Â ¹Ù¶÷Á÷ÇÑ °æ¿ì Æ÷Å©¸¦ ´ã´çÇÕ´Ï´Ù. ¶ÇÇÑ »ç¿ëÀÚ´Â HTTP / 1.1 ÇÁ·ÎÅäÄÝÀ» ÁؼöÇÏ´Â ÀÀ´äÀ» »ý¼ºÇϴ åÀÓÀÌ ÀÖ½À´Ï´Ù. http :: daemonÀÇ ´ÙÀ½ ¸Þ¼­µå´Â IO :: Socket :: INET Base Ŭ·¡½º : $ d = http¿Í °ü·ÃÇÏ¿© »õ (¶Ç´Â Çâ»óµÊ)ÀÔ´Ï´Ù. :: µ¥¸ó -> »õ·Î¿î $ d = http :: daemon-> »õ (% opts) ¿ä±¸ »çÇ× : ¡¤ Perl.


http :: daemon. °ü·Ã ¼ÒÇÁÆ®¿þ¾î