{"id":258741,"date":"2015-06-05T15:07:02","date_gmt":"2015-06-05T11:07:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=258741"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=258741","title":{"rendered":"\u041f\u0438\u0448\u0435\u043c \u0447\u0430\u0442 \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f C++ Builder. \u0421\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c"},"content":{"rendered":"<p>             \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u043d\u0430\u0437\u0430\u0434 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0447\u0430\u0442 \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0444\u0438\u0441\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u0441 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u043d\u0430 \u043d\u0430\u0443\u0447\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438. \u0414\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u0432 \u0441\u0440\u0435\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 Builder C++ 2006. \u041f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u0443 \u043c\u0435\u043d\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043e\u0434\u043d\u0430 \u0441\u0430\u043c\u0430\u044f \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2014 \u043f\u043e\u043b\u043d\u043e\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043e\u043f\u044b\u0442\u0430 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0441\u0435\u0442\u044f\u043c\u0438 \u0432 \u0431\u0438\u043b\u0434\u0435\u0440\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u043f\u0438\u0448\u0443 \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0436\u0435 \u00ab\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432\u00bb, \u043a\u0430\u043a \u044f. \u041e\u0442\u043c\u0435\u0447\u0443 \u0441\u0440\u0430\u0437\u0443, \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043d\u0430\u0439\u0434\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u043e, \u0431\u0443\u0434\u0443\u0442 \u043b\u0443\u0447\u0448\u0435 \u043c\u043e\u0435\u0439, \u043d\u043e \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043d\u0435 \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0421\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0430\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0437\u0434\u0435\u043b\u044e \u0435\u0435 \u043d\u0430 2 \u0447\u0430\u0441\u0442\u0438 \u2014 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0443\u044e \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0443\u044e.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. <\/p>\n<h4>\u0418\u0434\u0435\u044f<\/h4>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u043e \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u2014 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044f \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b \u0432 \u043a\u043e\u043b\u044c\u0446\u043e. \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e\u043c\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0443, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b. \u0422\u0430\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u043d\u0430\u043c \u043b\u0438 \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0438\u043b\u0438 \u043d\u0435\u0442; \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u2014 \u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435 \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043e\u043d\u043e \u043d\u0435 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0435\u0442 \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u0430. \u0418\u0434\u0435\u044f \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c, \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u043e \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. <\/p>\n<p>  \u0412\u0442\u043e\u0440\u0430\u044f \u0438\u0434\u0435\u044f \u043c\u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c. \u041f\u0443\u0441\u0442\u044c \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0441\u0435\u0440\u0432\u0435\u0440, \u0432\u0441\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u043a \u043d\u0435\u043c\u0443. \u0421 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u0430 \u043e\u043d \u0443\u0436\u0435 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u0443. \u041a\u0441\u0442\u0430\u0442\u0438 \u0433\u043e\u0432\u043e\u0440\u044f, \u0432\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u044d\u0442\u043e\u0439 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d IP \u0430\u0434\u0440\u0435\u0441 \u2014 IP-\u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0414\u0430 \u0438 \u043f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438\u0437 \u0441\u0435\u0442\u0438 \u043d\u0435 \u043f\u0440\u0438\u0439\u0434\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u0430\u0442\u044c \u0442\u043e\u0433\u043e, \u043a \u043a\u043e\u043c\u0443 \u043e\u043d \u0431\u044b\u043b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d.<\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043f\u0440\u0438\u0447\u0435\u043c \u0442\u0430\u043a\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 \u00abplug and play\u00bb \u2014 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0438 \u0441\u0440\u0430\u0437\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0437\u0430 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0443. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043e\u043a\u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0431\u0443\u0434\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u0434\u0430\u0436\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044e \u0431\u0430\u0440\u0430.<\/p>\n<p>  \u041a\u0430\u043a \u0431\u0443\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u0441\u044b\u043f\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f? \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043e\u043a\u0435\u0442\u044b, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0431\u0438\u043b\u0434\u0435\u0440\u0430 ClientSocket \u0438 ServerSocket, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<h4>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h4>\n<p>  <\/p>\n<h5>\u0421\u0435\u0440\u0432\u0435\u0440<\/h5>\n<p>  \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430-\u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435. \u0422.\u0435. \u043f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u043d\u0435\u0435 \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0438\u043a\u0430\u043a\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u0445, \u0432 \u0441\u0430\u043c\u043e\u0439 \u0436\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0432\u0441\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435. \u0412\u043e\u043e\u0431\u0449\u0435, \u0441\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u043e\u043a\u0435\u0442\u043e\u0432 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 SendText, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 AnsiString (\u0433\u0434\u0435-\u0442\u043e \u044f \u0432\u044b\u0447\u0438\u0442\u0430\u043b \u043f\u0440\u043e \u0434\u043b\u0438\u043d\u0443 \u0432 4,3 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0447\u0442\u043e \u0441\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u0435\u0442), \u043d\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e\u043c\u0443, \u043a\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0430 \u043d\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0433\u043e IP-\u0430\u0434\u0440\u0435\u0441. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0432\u044b\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0442\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0432 \u043a\u0430\u043a\u043e\u043c \u043e\u043d\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438\u0441\u044c. \u0412 .h \u0444\u0430\u0439\u043b\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u043c\u0430\u0441\u0441\u0438\u0432 m \u0442\u0438\u043f\u0430 AnsiString, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 100 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u044f \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043e\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u043e\u0439 \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430. \u041f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0438\u043c\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440. \u041e\u043d\u043e \u0432\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u043e\u043c\u0435\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438 \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u043e\u043c\u0435\u0440\u043e\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u043f\u0435\u0440\u0432\u0443\u044e \u043f\u0443\u0441\u0442\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443, \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e analog(), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u043e\u043c\u0435\u0440 \u043f\u0443\u0441\u0442\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438.<\/p>\n<pre><code class=\"cpp\">int TFormMain::analog() { int a; for(int i=0;i&lt;mass;i++) { if(m[i]==&quot;&quot;) { a=i; break; } } return a; } <\/code><\/pre>\n<p>  \u0412 \u0441\u043e\u0431\u044b\u0442\u0438\u0438 OnConnect \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u0439\u043c\u0435\u0440. \u041f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u043a\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0442\u0430\u0439\u043c\u0435\u0440\u043e\u043c \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u0439\u043c\u0435\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0435\u0433\u043e \u0438 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f. \u041f\u043e \u0442\u0430\u0439\u043c\u0435\u0440\u0443 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0446\u0438\u043a\u043b\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0432\u0441\u0435 \u0438\u043c\u0435\u043d\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432. \u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u2014 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u0421\u043f\u0438\u0441\u043e\u043a \u0436\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f online() \u00ab\u0441\u043a\u043b\u0435\u0438\u0432\u0430\u044e\u0449\u0430\u044f\u00bb \u0438\u043c\u0435\u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\"> void __fastcall TFormMain::ServerSocketClientConnect(TObject *Sender,       TCustomWinSocket *Socket) { Timer1-&gt;Enabled=true; } \/\/---------------------------------------------------------------------------  void __fastcall TFormMain::Timer1Timer(TObject *Sender) {  if(ServerSocket-&gt;Socket-&gt;ActiveConnections!=0) for(int i=0;i&lt;ServerSocket-&gt;Socket-&gt;ActiveConnections;i++) ServerSocket-&gt;Socket-&gt;Connections[i]-&gt;SendText(&quot;8714&quot;+online()); Timer1-&gt;Enabled=false; } \/\/---------------------------------------------------------------------------  <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cpp\">AnsiString TFormMain::online() { char str[500]=&quot;&quot;; for(int i=0;i&lt;analog();i++) { strcat(str,m[i].c_str()); strcat(str,&quot;,&quot;); } return str; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u0432\u0441\u0435 \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 OnRead. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u043c\u043e\u0433\u043e \u043a\u0430\u043a \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c, \u0442\u0430\u043a \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 4 \u0446\u0438\u0444\u0440\u044b. \u042d\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u0446\u0438\u0444\u0440, \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d\u043d\u0430\u044f \u043c\u043d\u043e\u0439 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u043c\u043e\u0433\u043b\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u00ab\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438\u00bb, \u0438\u043b\u0438 \u0436\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u0432 \u0441\u0435\u0431\u0435 \u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0438. \u0412\u0441\u0435\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u0443 4 \u0442\u0438\u043f\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043a\u043e\u0434\u043e\u043c 6141 \u043f\u043e\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438, \u043e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u043e\u0431\u0449\u0430\u044e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438\u043c\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u043d\u043e\u0441\u0438\u0442 \u0435\u0433\u043e \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432 Memo (\u0434\u0435\u043a\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0442\u043e\u0431\u044b \u0437\u043d\u0430\u0442\u044c, \u043a\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d). \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u043a\u043e\u0434\u0430\u043c\u0438 5280 \u0438 5487 \u043f\u043e\u0442\u0435\u0440\u044f\u043b\u0438 \u0441\u0432\u043e\u044e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u043e \u043d\u0435 \u0431\u044b\u043b\u0438 \u0443\u0431\u0440\u0430\u043d\u044b \u043c\u043d\u043e\u0439 \u0438\u0437 \u043a\u043e\u0434\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043a\u043e\u0434\u043e\u043c 3988 \u0441\u0430\u043c\u044b\u0435 \u0432\u0430\u0436\u043d\u044b\u0435. \u042d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u0432 \u0441\u0435\u0431\u0435 \u0432\u0441\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f: <\/p>\n<p>  <i>3988&lt;\u0418\u043c\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044f&gt;%&lt;\u0418\u043c\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f&gt;:&lt;\u0422\u0435\u043a\u0441\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f&gt;.<\/i><\/p>\n<p>  \u0412\u043e\u043e\u0431\u0449\u0435, \u0438\u0437 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043e\u0434 \u043c\u0435\u0442\u043e\u0434\u043e\u043c SubString, \u043e\u0442 \u044d\u0442\u043e\u043c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u0435\u0433\u043e \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u0436\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u043c\u0435\u043d\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u0435\u043a\u0441\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u0417\u0430\u0442\u0435\u043c \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0430 7788&lt;\u0418\u043c\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044f&gt;:&lt;\u0422\u0435\u043a\u0441\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f&gt;. \u041e\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0443-\u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044e. \u041a\u0430\u043a, \u0435\u0441\u043b\u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0433\u043e \u043d\u043e\u043c\u0435\u0440 \u0430 \u043d\u0435 \u0438\u043c\u044f? \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f numer(AnsiString), \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0430\u044f \u0438\u043c\u044f, \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u044e\u0449\u0430\u044f \u043c\u0430\u0441\u0441\u0438\u0432 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0430\u044f \u043d\u043e\u043c\u0435\u0440 \u044f\u0447\u0435\u0439\u043a\u0438 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044d\u0442\u043e \u0438\u043c\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">void __fastcall TFormMain::ServerSocketClientRead(TObject *Sender,       TCustomWinSocket *Socket) { message=Socket-&gt;ReceiveText(); time=Now().CurrentDateTime(); if(message.SubString(1,4).AnsiCompare(&quot;6141&quot;)==0) { m[analog()]=message.SubString(5,message.Length()); ListBox1-&gt;Clear(); for(int i=0;i&lt;ServerSocket-&gt;Socket-&gt;ActiveConnections;i++) { ListBox1-&gt;Items-&gt;Add(m[i]); } } else if(message.SubString(1,4).AnsiCompare(&quot;5487&quot;)==0) { for(int i=0;i&lt;ServerSocket-&gt;Socket-&gt;ActiveConnections;i++) ServerSocket-&gt;Socket-&gt;Connections[i]-&gt;SendText(&quot;8714&quot;+online()); } else if(message.SubString(1,4).AnsiCompare(&quot;3988&quot;)==0) { nametowho=message.SubString(message.AnsiPos('\u0419')+1,message.AnsiPos(':')-message.AnsiPos('\u0419')-1); name=message.SubString(5,message.AnsiPos('\u0419')-5); if(nametowho.IsEmpty()==false && (message.SubString(message.AnsiPos(':')+1,message.Length()).IsEmpty())==false) { ServerSocket-&gt;Socket-&gt;Connections[numer(nametowho)]-&gt;SendText(&quot;7788&quot;+name+&quot;:&quot;+message.SubString(message.AnsiPos(':')+1,message.Length())); ofstream fout(&quot;chat.txt&quot;,ios::app); fout&lt;&lt;time.c_str()&lt;&lt;&quot;   &quot;&lt;&lt;message.c_str()&lt;&lt;endl; fout.close(); } } else if(message.SubString(1,4).AnsiCompare(&quot;5280&quot;)==0) {  ServerSocket-&gt;Socket-&gt;Connections[numer(message.SubString(message.Pos('#')+1,message.Pos('%')-message.Pos('#')-1))]-&gt;SendText( &quot;6734&quot;+message.SubString(message.Pos('%')+1,message.Length()-message.Pos('%'))); } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u0440\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a\u0430\u043a\u043e\u0433\u043e \u043b\u0438\u0431\u043e \u0438\u0437 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u0447\u0438\u0449\u0430\u0435\u0442\u0441\u044f, \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u043e\u043f\u044f\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0438 (\u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u043c\u0435\u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0432 \u0442\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0432 \u043a\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u044b) \u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u0437\u0430\u043d\u043e\u0432\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f. \u0422\u0430\u043a\u0436\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0445\u0441\u044f \u0432 \u0441\u0435\u0442\u0438. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0430\u0439\u043c\u0435\u0440\u0430. \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0438\u043c\u0435\u043d\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0446\u0438\u043a\u043b\u0430:<\/p>\n<pre><code class=\"cpp\">void __fastcall TFormMain::ServerSocketClientDisconnect(TObject *Sender,       TCustomWinSocket *Socket) { if(ServerSocket-&gt;Socket-&gt;ActiveConnections!=0) { for(int i=0;i&lt;mass;i++) { m[i]=&quot;&quot;; } TestNames();  Timer1-&gt;Enabled=true;  } } <\/code><\/pre>\n<p>  <\/p>\n<h4>\u0413\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/h4>\n<p>  \u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u043e\u043a\u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/25e\/aa9\/609\/25eaa96099804ebd9e76d9a406f8178f.png\"\/><\/p>\n<p>  \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u0431\u044b\u043b\u043e \u0432 \u043f\u043b\u0430\u043d\u0430\u0445 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u0430\u043a\u0443\u044e \u043b\u0438\u0431\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u043e\u043a\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043d\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u0440\u0435\u0448\u0438\u043b \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435: IP-\u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439, \u043f\u043e\u0440\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0438\u043c\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u043a\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d \u0437\u0430\u043f\u0443\u0449\u0435\u043d (\u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u00ab1\u00bb, \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044f \u044d\u0442\u043e \u043f\u043e\u043a\u0430 \u043d\u0435 \u0441\u043c\u043e\u0433), \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043c\u0435\u043d \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432. \u0421\u0435\u0440\u0432\u0435\u0440 \u0441\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u044d\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u044f \u0438\u0445 \u043d\u0435 \u0431\u0443\u0434\u0443. \u0422\u0430\u043a\u0436\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d \u043e\u0442\u043b\u043e\u0432 \u043e\u0448\u0438\u0431\u043e\u043a (\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u043e\u043e\u0431\u0449\u0435 \u0437\u0430 2 \u043d\u0435\u0434\u0435\u043b\u0438 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u043e, \u043d\u043e \u043c\u0430\u043b\u043e \u043b\u0438, \u0432\u0441\u0435 \u0442\u0430\u043a\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0430\u0440\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441\u0435\u0442\u0438). <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0413\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\"> void __fastcall TFormMain::DrawItem(TMessage& Msg) {      IconDrawItem((LPDRAWITEMSTRUCT)Msg.LParam);      TForm::Dispatch(&Msg); } \/\/--------------------------------------------------------------------------- void __fastcall TFormMain::MyNotify(TMessage& Msg) {     POINT MousePos;      switch(Msg.LParam)     {         case WM_RBUTTONUP:             if (GetCursorPos(&MousePos))             {                 PopupMenu1-&gt;PopupComponent = FormMain;                 SetForegroundWindow(Handle);                 PopupMenu1-&gt;Popup(MousePos.x, MousePos.y);             }             else                 Show();             break;         case WM_LBUTTONDBLCLK:         Show();          break;         default:             break;     }     TForm::Dispatch(&Msg); } \/\/---------------------------------------------------------------------------  \/\/--------------------------------------------------------------------------- bool __fastcall TFormMain::TrayMessage(DWORD dwMessage) {    NOTIFYICONDATA tnd;    PSTR pszTip;     pszTip = TipText();     tnd.cbSize          = sizeof(NOTIFYICONDATA);    tnd.hWnd            = Handle;    tnd.uID             = IDC_MYICON;    tnd.uFlags          = NIF_MESSAGE | NIF_ICON | NIF_TIP;    tnd.uCallbackMessage\t= MYWM_NOTIFY;     if (dwMessage == NIM_MODIFY)     {         tnd.hIcon\t\t= (HICON)IconHandle();         if (pszTip)            lstrcpyn(tnd.szTip, pszTip, sizeof(tnd.szTip)); \t    else         tnd.szTip[0] = '\\0';     }    else     {         tnd.hIcon = NULL;         tnd.szTip[0] = '\\0';     }     return (Shell_NotifyIcon(dwMessage, &tnd)); } \/\/--------------------------------------------------------------------------- HICON __fastcall TFormMain::IconHandle(void) { return (Image2-&gt;Picture-&gt;Icon-&gt;Handle); }  \/\/--------------------------------------------------------------------------- PSTR __fastcall TFormMain::TipText(void) {         return (&quot;Office Chat&quot;);  } \/\/--------------------------------------------------------------------------- LRESULT IconDrawItem(LPDRAWITEMSTRUCT lpdi) { return 0; } \/\/---------------------------------------------------------------------------  \/\/---------------------------------------------------------------------------   void __fastcall TFormMain::FormDestroy(TObject *Sender) { \tTrayMessage(NIM_DELETE); } \/\/---------------------------------------------------------------------------  void __fastcall TFormMain::N1Click(TObject *Sender) { Show(); } \/\/---------------------------------------------------------------------------  void __fastcall TFormMain::N2Click(TObject *Sender) { Application-&gt;Terminate(); } \/\/---------------------------------------------------------------------------  void __fastcall TFormMain::FormCloseQuery(TObject *Sender, bool &CanClose) { CanClose=false; FormMain-&gt;Hide(); } \/\/---------------------------------------------------------------------------    void __fastcall TFormMain::FormCreate(TObject *Sender) { unsigned long Size = 256;    char *Buffer = new char[Size];  Label5-&gt;Caption=GetUserName(Buffer, &Size); delete [] Buffer; } \/\/---------------------------------------------------------------------------  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0445\u043e\u0447\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b\u0439, \u043e\u0434\u043d\u0430\u043a\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f 20 \u043b\u044e\u0434\u044f\u043c (\u0431\u043e\u043b\u044c\u0448\u0435 \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b). \u0412\u0441\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438, exe-\u0444\u0430\u0439\u043b\u044b \u0438 \u043f\u043e\u043b\u043d\u044b\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u043a\u043e\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0431\u0443\u0434\u0443\u0442 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. <\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.             <\/p>\n<div class=\"clear\"><\/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\/259641\/\"> http:\/\/habrahabr.ru\/post\/259641\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>             \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u043d\u0430\u0437\u0430\u0434 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0447\u0430\u0442 \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0444\u0438\u0441\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u0441 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u043d\u0430 \u043d\u0430\u0443\u0447\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438. \u0414\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u0432 \u0441\u0440\u0435\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 Builder C++ 2006. \u041f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u0443 \u043c\u0435\u043d\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043e\u0434\u043d\u0430 \u0441\u0430\u043c\u0430\u044f \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2014 \u043f\u043e\u043b\u043d\u043e\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043e\u043f\u044b\u0442\u0430 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0441\u0435\u0442\u044f\u043c\u0438 \u0432 \u0431\u0438\u043b\u0434\u0435\u0440\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u043f\u0438\u0448\u0443 \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0436\u0435 \u00ab\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432\u00bb, \u043a\u0430\u043a \u044f. \u041e\u0442\u043c\u0435\u0447\u0443 \u0441\u0440\u0430\u0437\u0443, \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043d\u0430\u0439\u0434\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u043e, \u0431\u0443\u0434\u0443\u0442 \u043b\u0443\u0447\u0448\u0435 \u043c\u043e\u0435\u0439, \u043d\u043e \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043d\u0435 \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0421\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0430\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0437\u0434\u0435\u043b\u044e \u0435\u0435 \u043d\u0430 2 \u0447\u0430\u0441\u0442\u0438 \u2014 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0443\u044e \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0443\u044e.  <\/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-258741","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/258741","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=258741"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/258741\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=258741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=258741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=258741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}