{"id":172699,"date":"2013-03-14T09:55:03","date_gmt":"2013-03-14T05:55:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=172699"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=172699","title":{"rendered":"<span class=\"post_title\">\u041d\u043e\u0432\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 PHP \u043f\u043e\u0434 \u0441\u0442\u0430\u0440\u044b\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c: event<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0412 PE\u0421L \u043a\u0430\u043a-\u0442\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f <a href=\"http:\/\/libevent.org\/\">libevent<\/a>. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, libevent \u0432\u0435\u0440\u0441\u0438\u0438 2 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0441\u044f \u043d\u0438 \u043e\u0434\u043d\u043e\u0438\u043c\u0451\u043d\u043d\u044b\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c <i>libevent<\/i>, \u043d\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c <i>event<\/i>(\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0435\u043b\u0438\u0437 \u0431\u044b\u043b \u0432 2004 \u0433\u043e\u0434\u0443). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u0432\u0430\u043b\u044f\u0432\u0448\u0435\u0435\u0441\u044f \u0441 2004 \u0433\u043e\u0434\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u00abevent\u00bb.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, <i>event<\/i> \u2014 \u044d\u0442\u043e \u0441\u0442\u0430\u0440\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432 \u043d\u043e\u0432\u043e\u043c \u043e\u0431\u043b\u0438\u0447\u0438\u0438:<\/p>\n<ul>\n<li>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 libevent 2.0.2-alpha \u0438 \u0432\u044b\u0448\u0435, \u0432\u043a\u043b\u044e\u0447\u0430\u044f HTTP-\u0441\u0435\u0440\u0432\u0435\u0440, <i>Event Listener<\/i>, DNS-\u0440\u0435\u0437\u043e\u043b\u0432\u0435\u0440 \u0438 OpenSSL, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u0438 \u00ab\u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0431\u0443\u0444\u0435\u0440\u043e\u0432\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445<\/li>\n<li>\u043d\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 API<\/li>\n<li>\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442(libevent_core, libevent_extra, libevent_pthreads, libevent_openssl) \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435<\/li>\n<\/ul>\n<p>  \u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 OO API \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 libevent \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0441\u043e\u0431\u043e\u0439 \u043a\u0440\u0430\u0441\u043e\u0442\u043e\u0439:<\/p>\n<pre><code class=\"cpp\">bufferevent_setcb bufferevent_setwatermark bufferevent_socket_get_dns_error evbuffer_add_buffer evbuffer_get_contiguous_space <\/code><\/pre>\n<p>  \u0438 \u0442.\u043f.<\/p>\n<p>  \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u0447\u043b\u0435\u043d \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b PHP, Johannes Schl\u00fcter \u0437\u0430\u0432\u0435\u0440\u0438\u043b, \u0447\u0442\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0432\u044b\u0438\u0433\u0440\u044b\u0432\u0430\u044e\u0442 \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u0430\u0436\u0435 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u044e\u0442. \u0412\u043e\u043e\u0431\u0449\u0435, \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c.<\/p>\n<h5>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/h5>\n<p>  <a href=\"http:\/\/docs.php.net\/manual\/en\/intro.event.php\">http:\/\/docs.php.net\/manual\/en\/intro.event.php<\/a>. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0442\u0430\u043c \u0436\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00abExamples\u00bb.<\/p>\n<h5>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h5>\n<p>  <code>$ sudo pecl install event-beta<\/code><\/p>\n<p>  \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 Gentoo, Fedora, Ubuntu \u0438 FreeBSD. \u041f\u043e\u043a\u0430 \u0432\u0440\u0435\u043c\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u0445 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f\u0445, \u043a\u043e\u0434 \u043f\u0440\u0435\u0431\u044b\u0432\u0430\u0435\u0442 \u0432 beta-\u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e.<\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e.    \t \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/172699\/\"> http:\/\/habrahabr.ru\/post\/172699\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0412 PE\u0421L \u043a\u0430\u043a-\u0442\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f <a href=\"http:\/\/libevent.org\/\">libevent<\/a>. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, libevent \u0432\u0435\u0440\u0441\u0438\u0438 2 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0441\u044f \u043d\u0438 \u043e\u0434\u043d\u043e\u0438\u043c\u0451\u043d\u043d\u044b\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c <i>libevent<\/i>, \u043d\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c <i>event<\/i>(\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0435\u043b\u0438\u0437 \u0431\u044b\u043b \u0432 2004 \u0433\u043e\u0434\u0443). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u0432\u0430\u043b\u044f\u0432\u0448\u0435\u0435\u0441\u044f \u0441 2004 \u0433\u043e\u0434\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u00abevent\u00bb.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-172699","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/172699","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=172699"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/172699\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=172699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=172699"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=172699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}