{"id":212101,"date":"2014-02-10T15:29:03","date_gmt":"2014-02-10T11:29:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=212101"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=212101","title":{"rendered":"<span class=\"post_title\">\u041a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 https \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u043c\u0438 \u0441\u043e\u043a\u0435\u0442\u0430\u043c\u0438. \u0427\u0430\u0441\u0442\u044c 3<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0439 https \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0441\u043e\u043a\u0435\u0442\u0430\u0445. \u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441 \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0437\u0434\u0435\u0441\u044c:<br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/211474\/\">\u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u043a\u0440\u043e\u0441c\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 ssl<\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/211661\/\">\u041a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 https \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u043c\u0438 \u0441\u043e\u043a\u0435\u0442\u0430\u043c\u0438 <\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/211853\/\">\u041a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 https \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u043c\u0438 \u0441\u043e\u043a\u0435\u0442\u0430\u043c\u0438. \u0427\u0430\u0441\u0442\u044c 2<\/a><\/p>\n<p>  \u0412 \u043a\u043e\u043d\u0446\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0432 Visual Studio 2012 (Windows 8 64bit), g++4.4 (Linux 32bit), g++4.6 (Linux 64bit). \u0421\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043e\u0442 \u043b\u044e\u0431\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u043e\u0442\u0432\u0435\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<br \/>  \u041d\u043e \u043d\u0430\u0447\u043d\u0443 \u044f \u0441\u0442\u0430\u0442\u044c\u044e \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u043c\u0430\u0441\u0441\u0443 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043e\u0442\u043a\u043b\u0438\u043a\u043e\u0432 \u043e \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e\u0441\u0442\u0438 \u0441\u0432\u043e\u0435\u0433\u043e \u043a\u043e\u0434\u0430, \u043e\u0442\u043d\u044b\u043d\u0435 \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u0432\u043e\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c \u0435\u0449\u0435 \u0438 \u0432 \u0445\u0430\u0431 \u00ab\u041d\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u00bb.<br \/>  \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u044f \u0440\u0435\u0448\u0438\u043b \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043c\u0435\u0442\u043a\u0443 \u00abtutorial\u00bb: \u043a\u0442\u043e-\u0442\u043e \u043d\u0430\u0439\u0434\u0435\u0442 \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0432 \u043c\u043e\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445, \u0430 \u043a\u043e\u043c\u0443-\u0442\u043e \u043e\u043d\u0438 \u043f\u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0434\u0438\u043b\u0435\u0442\u0430\u043d\u0442\u0441\u043a\u0438\u043c\u0438. \u042f \u043d\u0435 \u043f\u0440\u043e\u0442\u0438\u0432\u2026<\/p>\n<p>  <b>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e \u043c\u043e\u0439 \u0441\u0442\u0438\u043b\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/b><br \/>  1. \u042f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0443 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u043f\u043e \u0440\u044f\u0434\u0443 \u043f\u0440\u0438\u0447\u0438\u043d:<br \/>  \u0430) \u042f \u0445\u043e\u0447\u0443 \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u043b\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0439 \u0437\u043d\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043d\u0435 \u0442\u0430\u043a \u0443\u0434\u043e\u0431\u043d\u0435\u0439.<br \/>  \u0431) \u0412 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u043c\u043e\u0433\u0443 \u0437\u0430\u0445\u043e\u0442\u0435\u0442\u044c \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043a \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 template, \u0438 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0440\u0430\u0434\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043a\u043e\u0434.<br \/>  \u0422\u0435 \u043a\u0442\u043e \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u044f \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f \u2014 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439 stl \u0438 boost \u0441\u043d\u0430\u0447\u0430\u043b\u0430, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b server.h \u0432 server.cpp \u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435\u043c \u0445\u043e\u0440\u043e\u0448\u043e\u2026<\/p>\n<p>  2. \u042f \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435: \u0441\u0447\u0438\u0442\u0430\u044e \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c. \u0415\u0441\u043b\u0438 \u043a\u043b\u0430\u0441\u0441 \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e, \u043a\u0440\u043e\u043c\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0438\u0445 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0442\u043e \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0443 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0439 \u043e\u0434\u043d\u0443 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e: \u0435\u0433\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440.<br \/>  \u041c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043e\u043e\u0431\u0449\u0435 \u0431\u0435\u0437 \u043a\u043b\u0430\u0441\u0441\u0430, \u043d\u043e \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u043c\u043d\u0435 \u043a\u0430\u043a-\u0442\u043e \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u0435\u0439, \u0434\u0430 \u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u043f\u0443\u0441\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0442\u043e\u0436\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b.<\/p>\n<p>  3. \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c std::copy \u0432\u043c\u0435\u0441\u0442\u043e memcpy \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435: std::copy \u2014 \u0442\u043e\u0440\u043c\u043e\u0437!<\/p>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u0445\u043e\u0447\u0443 \u043f\u043e\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438\u0442\u044c \u0432\u0441\u0435\u0445, \u043a\u0442\u043e \u043d\u0435 \u043f\u043e\u043b\u0435\u043d\u0438\u043b\u0441\u044f \u043e\u0442\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a \u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u0438\u0445 \u0443\u0447\u0435\u0441\u0442\u044c \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p>  <b>\u0422\u0435\u043f\u0435\u0440\u044c \u043e \u0433\u043b\u0430\u0432\u043d\u043e\u043c. <\/b><br \/>  \u0427\u0442\u043e\u0431\u044b \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0440\u0430\u0437\u0434\u0430\u0447\u0435 \u0444\u0430\u0439\u043b\u043e\u0432, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435: \u043d\u0430\u0447\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u043e\u0433\u043e \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<br \/>  \u0412 Windows \u0438 Linux \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c select \u0432 Windows \u0438 epoll \u0432 Linux.<\/p>\n<p>  \u0415\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 epoll \u0432 Windows \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442. \u0427\u0442\u043e\u0431\u044b \u043a\u043e\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u0435\u0434\u0438\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u043e\u0434 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0442\u0430\u043a, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e epoll \u0432 Windows \u0435\u0441\u0442\u044c!<\/p>\n<p>  <b>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f epoll \u0434\u043b\u044f Windows \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e select<\/b><br \/>  1. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 Visual Studio \u0434\u0432\u0430 \u043f\u0443\u0441\u0442\u044b\u0445 \u0444\u0430\u0439\u043b\u0430 \u0438\u0437 \u0442\u043e\u0439 \u0436\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u0433\u0434\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u00abserver.h\u00bb. \u0424\u0430\u0439\u043b\u044b: \u00abepoll.h\u00bb \u0438 \u00abepoll.cpp\u00bb. <br \/>  2. \u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043c \u0432 \u0444\u0430\u0439\u043b epoll.h \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e epoll:  <\/p>\n<pre><code class=\"cpp\">#ifndef __linux__  enum EPOLL_EVENTS   {     EPOLLIN = 0x001, #define EPOLLIN EPOLLIN     EPOLLPRI = 0x002, #define EPOLLPRI EPOLLPRI     EPOLLOUT = 0x004, #define EPOLLOUT EPOLLOUT     EPOLLRDNORM = 0x040, #define EPOLLRDNORM EPOLLRDNORM     EPOLLRDBAND = 0x080, #define EPOLLRDBAND EPOLLRDBAND     EPOLLWRNORM = 0x100, #define EPOLLWRNORM EPOLLWRNORM     EPOLLWRBAND = 0x200, #define EPOLLWRBAND EPOLLWRBAND     EPOLLMSG = 0x400, #define EPOLLMSG EPOLLMSG     EPOLLERR = 0x008, #define EPOLLERR EPOLLERR     EPOLLHUP = 0x010, #define EPOLLHUP EPOLLHUP     EPOLLRDHUP = 0x2000, #define EPOLLRDHUP EPOLLRDHUP     EPOLLONESHOT = (1 &lt;&lt; 30), #define EPOLLONESHOT EPOLLONESHOT     EPOLLET = (1 &lt;&lt; 31) #define EPOLLET EPOLLET   };   \/* Valid opcodes ( &quot;op&quot; parameter ) to issue to epoll_ctl().  *\/ #define EPOLL_CTL_ADD 1      \/* Add a file descriptor to the interface.  *\/ #define EPOLL_CTL_DEL 2      \/* Remove a file descriptor from the interface.  *\/ #define EPOLL_CTL_MOD 3      \/* Change file descriptor epoll_event structure.  *\/  typedef union epoll_data {     void\t\t\t\t*ptr;     int\t\t\t\t\tfd;     unsigned int\t\tu32;     unsigned __int64    u64; } epoll_data_t;  struct epoll_event {     unsigned __int64     events;      \/* Epoll events *\/     epoll_data_t\t\t data;        \/* User data variable *\/ };  int epoll_create(int size); int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event); int epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout);  #endif  <\/code><\/pre>\n<p>  3. \u0412 \u0444\u0430\u0439\u043b epoll.cpp \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0441\u043e\u043a\u0435\u0442\u044b \u0438 \u0438\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f:  <\/p>\n<pre><code class=\"cpp\">#include &quot;epoll.h&quot; #include &lt;map&gt; #ifndef WIN32 #include &lt;unistd.h&gt; #include &lt;sys\/socket.h&gt; #include &lt;netinet\/in.h&gt; #include &lt;arpa\/inet.h&gt; #include &lt;netdb.h&gt; #else #include &lt;io.h&gt; #include &lt;Winsock2.h&gt; #pragma comment(lib, &quot;ws2_32.lib&quot;) #endif  std::map&lt;int, epoll_event&gt; g_mapSockets; <\/code><\/pre>\n<p>  4. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u0434 \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:  <\/p>\n<pre><code class=\"cpp\">int epoll_create(int size) { \treturn 1; } <\/code><\/pre>\n<p>  \u0427\u0442\u043e \u0442\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442?<br \/>  \u041d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u043c\u043e\u0433\u0443 \u0441\u0443\u0434\u0438\u0442\u044c \u043f\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438: \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u043b\u0438\u043d\u0443\u043a\u0441\u0435 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 epoll_create \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0444\u0430\u0439\u043b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0441\u043e\u043a\u0435\u0442\u043e\u0432. \u0412\u0438\u0434\u0438\u043c\u043e \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u0445. <br \/>  \u0423 \u043d\u0430\u0441 \u0436\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u0438 \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u043a\u0435\u0442\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 epoll_create \u0443 \u043d\u0430\u0441 \u044d\u0442\u043e \u00ab\u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0430\u00bb.<\/p>\n<p>  5. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e stl \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u043a\u0435\u0442\u043e\u0432 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u043e:  <\/p>\n<pre><code class=\"cpp\">int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) { \tswitch(op) \t{ \t\tcase EPOLL_CTL_ADD: \t\tcase EPOLL_CTL_MOD: \t\t\tg_mapSockets[fd] = *event; \t\t\treturn 0; \t\tcase EPOLL_CTL_DEL: \t\t\tif (g_mapSockets.find(fd) == g_mapSockets.end())  \t\t\t\treturn -1;  \t\t\tg_mapSockets.erase(fd); \t\t\treturn 0; \t} \treturn 0; } <\/code><\/pre>\n<p>  6. \u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u0433\u043b\u0430\u0432\u043d\u043e\u0435: \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0447\u0435\u0440\u0435\u0437 select<\/p>\n<pre><code class=\"cpp\">int epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) { \tif ((!events) || (!maxevents)) \t\treturn -1;  \t\/\/\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 select \tfd_set readfds, writefds, exceptfds; \t \tFD_ZERO(&readfds); \tFD_ZERO(&writefds); \tFD_ZERO(&exceptfds); \t \t\/\/\u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441\u043e\u043a\u0435\u0442\u0430\u043c\u0438 \tint nFDS = 0; \tfor (auto it=g_mapSockets.begin(); it != g_mapSockets.end(); ++it) \t{ \t\tif (it-&gt;first == -1) \t\t\tcontinue; \t\t \t\tif (it-&gt;first &gt; nFDS) \t\t\tnFDS = it-&gt;first;  \t\tFD_SET(it-&gt;first, &readfds); \t\tFD_SET(it-&gt;first, &writefds); \t\tFD_SET(it-&gt;first, &exceptfds); \t}  \t\/\/\u0417\u0430\u0434\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \tstruct timeval tv; \ttv.tv_sec = timeout\/1000; \ttv.tv_usec = timeout - tv.tv_sec*1000;  \t\/\/\u0416\u0434\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \tnFDS++; \tselect(nFDS, &readfds, &writefds, &exceptfds, &tv);  \t\/\/\u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u043e\u043d\u0430 \u0432\u044b\u0437\u0432\u0430\u043b\u0430 epoll \tint nRetEvents = 0; \tfor (auto it=g_mapSockets.begin(); (it != g_mapSockets.end() && nRetEvents &lt; maxevents); ++it) \t{ \t\tif (it-&gt;first == -1) \t\t\tcontinue; \t\tif (!FD_ISSET(it-&gt;first, &readfds) && !FD_ISSET(it-&gt;first, &writefds) && !FD_ISSET(it-&gt;first, &exceptfds)) \t\t\tcontinue;  \t\tmemcpy(&events[nRetEvents].data, &it-&gt;second.data, sizeof(epoll_data)); \t\t \t\tif (FD_ISSET(it-&gt;first, &readfds)) \t\t\tevents[nRetEvents].events |= EPOLLIN; \t\tif (FD_ISSET(it-&gt;first, &writefds)) \t\t\tevents[nRetEvents].events |= EPOLLOUT; \t\tif (FD_ISSET(it-&gt;first, &exceptfds)) \t\t\tevents[nRetEvents].events |= EPOLLERR;  \t\tnRetEvents++; \t}  \treturn nRetEvents; } <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0435. \u0424\u0443\u043d\u043a\u0446\u0438\u044f epoll \u0434\u043b\u044f Windows \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430!<\/p>\n<p>  <b>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 epoll \u0432 \u0441\u0435\u0440\u0432\u0435\u0440<\/b><\/p>\n<p>  1. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438:  <\/p>\n<pre><code class=\"cpp\">#ifdef __linux__ #include &lt;sys\/epoll.h&gt; #else #include &quot;epoll.h&quot; #endif <\/code><\/pre>\n<p>  2. \u0412 \u043a\u043b\u0430\u0441\u0441 CServer \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0438:  <\/p>\n<pre><code class=\"cpp\">\tprivate: \t\t\/\/\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u0441\u043b\u0443\u0448\u0430\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u043a\u0435\u0442\u0430 \t\tstruct epoll_event m_ListenEvent; \t\t\/\/\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u0441\u043e\u043a\u0435\u0442\u043e\u0432 \t\tvector&lt;struct epoll_event&gt; m_events; \t\tint m_epoll; <\/code><\/pre>\n<p>  3. \u0412 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 CServer \u0432\u0441\u0435, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 listen \u043c\u0435\u043d\u044f\u0435\u043c \u043d\u0430:  <\/p>\n<pre><code class=\"cpp\">\t\t\tm_epoll = epoll_create (1); \t\t\tif (m_epoll == -1) \t\t\t{ \t\t\t\tprintf(&quot;error: epoll_create\\n&quot;); \t\t\t\treturn; \t\t\t}  \t\t\tm_ListenEvent.data.fd = listen_sd; \t\t\tm_ListenEvent.events = EPOLLIN | EPOLLET; \t\t\tepoll_ctl (m_epoll, EPOLL_CTL_ADD, listen_sd, &m_ListenEvent);  \t\t\twhile(true) \t\t\t{ \t\t\t\tm_events.resize(m_mapClients.size()+1); \t\t\t\tint n = epoll_wait (m_epoll, &m_events[0], m_events.size(), 5000);  \t\t\t\tif (n == -1) \t\t\t\t\tcontinue;  \t\t\t\tCallback(n); \t\t\t}  <\/code><\/pre>\n<p>  4. \u0421\u0442\u0430\u0440\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e CServer::Callback \u043c\u0435\u043d\u044f\u0435\u043c \u043d\u0430 \u043d\u043e\u0432\u0443\u044e:  <\/p>\n<pre><code class=\"cpp\">\t\tvoid Callback(const int nCount) \t\t{ \t\t\tfor (int i = 0; i &lt; nCount; i++) \t\t\t{ \t\t\t\tSOCKET hSocketIn = m_events[i].data.fd;  \t\t\t\tif (m_ListenEvent.data.fd == (int)hSocketIn) \t\t\t\t{ \t\t\t\t\tif (!m_events[i].events == EPOLLIN) \t\t\t\t\t\tcontinue;  \t\t\t\t\tstruct sockaddr_in sa_cli;   \t\t\t\t\tsize_t client_len = sizeof(sa_cli); #ifdef WIN32 \t\t\t\t\tconst SOCKET sd = accept (hSocketIn, (struct sockaddr*) &sa_cli, (int *)&client_len); #else \t\t\t\t\tconst SOCKET sd = accept (hSocketIn, (struct sockaddr*) &sa_cli, (socklen_t *)&client_len); #endif   \t\t\t\t\tif (sd != INVALID_SOCKET) \t\t\t\t\t{ \t\t\t\t\t\t\/\/\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 \u043a\u043b\u0430\u0441\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \t\t\t\t\t\tm_mapClients[sd] = shared_ptr&lt;CClient&gt;(new CClient(sd)); \t\t\t\t\t\t \t\t\t\t\t\tauto it = m_mapClients.find(sd); \t\t\t\t\t\tif (it == m_mapClients.end()) \t\t\t\t\t\t\tcontinue; \t\t\t\t\t\t \t\t\t\t\t\t\/\/\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 epoll \t\t\t\t\t\tstruct epoll_event ev = it-&gt;second-&gt;GetEvent(); \t\t\t\t\t\tepoll_ctl (m_epoll, EPOLL_CTL_ADD, it-&gt;first, &ev); \t\t\t\t\t}\t\t\t\t\t \t\t\t\t\tcontinue; \t\t\t\t} \t\t\t\t\t \t\t\t\tauto it = m_mapClients.find(hSocketIn); \/\/\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043f\u043e \u0441\u043e\u043a\u0435\u0442\u0443 \t\t\t\tif (it == m_mapClients.end()) \t\t\t\t\tcontinue;  \t\t\t\tif (!it-&gt;second-&gt;Continue()) \/\/\u0414\u0435\u043b\u0430\u0435\u043c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \t\t\t\t{ \t\t\t\t\t\/\/\u0415\u0441\u043b\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u0432\u0435\u0440\u043d\u0443\u043b false, \u0442\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438\u0437 epoll \u0438 \u0438\u0437 \u043a\u043b\u0430\u0441\u0441\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \t\t\t\t\tepoll_ctl (m_epoll, EPOLL_CTL_DEL, it-&gt;first, NULL); \t\t\t\t\tm_mapClients.erase(it); \t\t\t\t} \t\t\t} \t\t} <\/code><\/pre>\n<p>  \u0421 \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c CClient.<br \/>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0435\u0433\u043e \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:  <\/p>\n<pre><code class=\"cpp\">\tprivate: \t\t\/\/\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u0441\u043e\u043a\u0435\u0442\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \t\tstruct epoll_event m_ClientEvent; \tpublic: \t\tconst struct epoll_event GetEvent() const {return m_ClientEvent;} <\/code><\/pre>\n<p>  \u0418 \u043d\u0430 \u044d\u0442\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 epoll \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u043e!<\/p>\n<p>  \u0412\u043e\u0442 \u0442\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043b\u044f Visual Studio: <a href=\"http:\/\/c0.3s3s.org\">c0.3s3s.org<\/a><br \/>  \u0414\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0432 Linux \u0444\u0430\u0439\u043b\u044b epoll.h \u0438 epoll.cpp \u043d\u0435 \u043d\u0443\u0436\u043d\u044b, \u0442.\u0435 \u0432\u0441\u0435 \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e: \u00ab\u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0434\u043d\u0443 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0444\u0430\u0439\u043b\u044b: serv.cpp, server.h, ca-cert.pem \u0438 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043d\u0430\u0431\u0440\u0430\u0442\u044c: \u00abg++ -std=c++0x -L\/usr\/lib -lssl -lcrypto serv.cpp\u00bb \u201e    \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\/212101\/\"> http:\/\/habrahabr.ru\/post\/212101\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0439 https \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0441\u043e\u043a\u0435\u0442\u0430\u0445. \u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441 \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0437\u0434\u0435\u0441\u044c:<br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/211474\/\">\u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u043a\u0440\u043e\u0441c\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 ssl<\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/211661\/\">\u041a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 https \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u043c\u0438 \u0441\u043e\u043a\u0435\u0442\u0430\u043c\u0438 <\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/211853\/\">\u041a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 https \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u043c\u0438 \u0441\u043e\u043a\u0435\u0442\u0430\u043c\u0438. \u0427\u0430\u0441\u0442\u044c 2<\/a><\/p>\n<p>  \u0412 \u043a\u043e\u043d\u0446\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0432 Visual Studio 2012 (Windows 8 64bit), g++4.4 (Linux 32bit), g++4.6 (Linux 64bit). \u0421\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043e\u0442 \u043b\u044e\u0431\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u043e\u0442\u0432\u0435\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<br \/>  \u041d\u043e \u043d\u0430\u0447\u043d\u0443 \u044f \u0441\u0442\u0430\u0442\u044c\u044e \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c.  <\/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-212101","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/212101","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=212101"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/212101\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=212101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=212101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=212101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}