{"id":479686,"date":"2023-08-09T10:43:25","date_gmt":"2023-08-09T10:43:25","guid":{"rendered":""},"modified":"2023-09-05T11:19:23","modified_gmt":"2023-09-05T11:19:23","slug":"windows-sockets-api-winsock","status":"publish","type":"wiki","link":"https:\/\/oneproxy.pro\/jp\/wiki\/windows-sockets-api-winsock\/","title":{"rendered":"Windows \u30bd\u30b1\u30c3\u30c8 API (Winsock)"},"content":{"rendered":"<p>Windows Sockets API (\u4e00\u822c\u306b Winsock \u3068\u3057\u3066\u77e5\u3089\u308c\u3066\u3044\u307e\u3059) \u306f\u3001\u958b\u767a\u8005\u304c Microsoft Windows \u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0 \u30b7\u30b9\u30c6\u30e0\u4e0a\u3067\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3067\u3059\u3002\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u3067\u901a\u4fe1\u3059\u308b\u305f\u3081\u306e\u6a19\u6e96\u5316\u3055\u308c\u305f\u65b9\u6cd5\u3092\u63d0\u4f9b\u3057\u3001\u63a5\u7d9a\u3092\u78ba\u7acb\u3057\u3001\u30c7\u30fc\u30bf\u3092\u9001\u53d7\u4fe1\u3057\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u95a2\u9023\u306e\u6a5f\u80fd\u3092\u30b7\u30fc\u30e0\u30ec\u30b9\u306b\u7ba1\u7406\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002Winsock API \u306f\u3001Windows \u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u4e0a\u3067\u3055\u307e\u3056\u307e\u306a\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8 \u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3084\u30b5\u30fc\u30d3\u30b9\u3092\u958b\u767a\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u4e0a\u3067\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<h2>Windows Sockets API (Winsock) \u306e\u8d77\u6e90\u3068\u305d\u306e\u6700\u521d\u306e\u8a00\u53ca\u306e\u6b74\u53f2<\/h2>\n<p>Winsock \u306e\u8d77\u6e90\u306f\u3001Windows \u4e0a\u3067\u4e00\u8cab\u3057\u305f\u30cd\u30c3\u30c8\u30ef\u30fc\u30af API \u306e\u5fc5\u8981\u6027\u304c\u751f\u3058\u305f 1990 \u5e74\u4ee3\u521d\u982d\u306b\u9061\u308a\u307e\u3059\u3002Winsock \u304c\u767b\u5834\u3059\u308b\u524d\u306f\u3001\u958b\u767a\u8005\u306f\u3055\u307e\u3056\u307e\u306a\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30d7\u30ed\u30c8\u30b3\u30eb\u306b\u5bfe\u3057\u3066\u3055\u307e\u3056\u307e\u306a\u72ec\u81ea\u306e API \u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u3001\u30af\u30ed\u30b9\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u958b\u767a\u304c\u9762\u5012\u3067\u3057\u305f\u3002Winsock \u306e\u958b\u767a\u306f\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30bf\u30b9\u30af\u7528\u306e\u7d71\u4e00\u3055\u308c\u305f API \u3092\u63d0\u4f9b\u3059\u308b\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u305f\u3001Microsoft\u3001FTP Software\u3001Novell \u306a\u3069\u306e\u8907\u6570\u306e\u7d44\u7e54\u306b\u3088\u308b\u5171\u540c\u4f5c\u696d\u3067\u3057\u305f\u3002<\/p>\n<p>Windows Sockets API (Winsock) \u304c\u521d\u3081\u3066\u516c\u306b\u8a00\u53ca\u3055\u308c\u305f\u306e\u306f\u30011992 \u5e74\u306e Windows 3.1 \u306e\u30ea\u30ea\u30fc\u30b9\u3067\u3001\u3053\u308c\u306b\u306f Winsock API \u306e\u6700\u521d\u306e\u5b9f\u88c5\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u306e\u30ea\u30ea\u30fc\u30b9\u306f\u3001\u958b\u767a\u8005\u304c Windows \u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u4e0a\u3067\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u7c21\u5358\u306b\u4f5c\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u305f\u3081\u3001\u91cd\u8981\u306a\u30de\u30a4\u30eb\u30b9\u30c8\u30fc\u30f3\u3068\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h2>Windows Sockets API (Winsock) \u306e\u8a73\u7d30\u60c5\u5831<\/h2>\n<p>Windows Sockets API (Winsock) \u306f\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u901a\u4fe1\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306e\u4e00\u9023\u306e\u95a2\u6570\u3068\u69cb\u9020\u3092\u516c\u958b\u3059\u308b\u30c0\u30a4\u30ca\u30df\u30c3\u30af \u30ea\u30f3\u30af \u30e9\u30a4\u30d6\u30e9\u30ea (DLL) \u3067\u3059\u3002TCP\/IP \u30e2\u30c7\u30eb\u306e\u30c8\u30e9\u30f3\u30b9\u30dd\u30fc\u30c8\u5c64\u3067\u52d5\u4f5c\u3057\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u901a\u4fe1\u306e\u8907\u96d1\u3055\u3092\u62bd\u8c61\u5316\u3057\u3066\u3001\u958b\u767a\u8005\u304c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 \u30ed\u30b8\u30c3\u30af\u306b\u96c6\u4e2d\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002Winsock \u306e\u4e3b\u8981\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u306f\u6b21\u306e\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>\n<p><strong>\u30bd\u30b1\u30c3\u30c8<\/strong>: \u30bd\u30b1\u30c3\u30c8\u306f Winsock \u306e\u57fa\u672c\u7684\u306a\u6982\u5ff5\u3067\u3042\u308a\u3001\u901a\u4fe1\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u8868\u3057\u307e\u3059\u3002\u30bd\u30b1\u30c3\u30c8\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 \u30bd\u30b1\u30c3\u30c8\u307e\u305f\u306f\u30b5\u30fc\u30d0\u30fc \u30bd\u30b1\u30c3\u30c8\u306b\u5206\u985e\u3067\u304d\u307e\u3059\u3002\u30bd\u30b1\u30c3\u30c8\u9593\u306e\u901a\u4fe1\u306f\u3001\u63a5\u7d9a\u6307\u5411 (TCP) \u307e\u305f\u306f\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u30ec\u30b9 (UDP) \u306e\u3044\u305a\u308c\u304b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30a2\u30c9\u30ec\u30c3\u30b7\u30f3\u30b0<\/strong>: Winsock \u306f\u3001IP \u30a2\u30c9\u30ec\u30b9\u3068\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u542b\u3080\u30a2\u30c9\u30ec\u30b9\u6307\u5b9a\u306b Berkeley Sockets API \u898f\u5247\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002IPv4 \u30d7\u30ed\u30c8\u30b3\u30eb\u3068 IPv6 \u30d7\u30ed\u30c8\u30b3\u30eb\u306e\u4e21\u65b9\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30d7\u30ed\u30c8\u30b3\u30eb<\/strong>: Winsock \u306f\u3055\u307e\u3056\u307e\u306a\u30c8\u30e9\u30f3\u30b9\u30dd\u30fc\u30c8 \u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u6700\u3082\u4e00\u822c\u7684\u306a\u306e\u306f TCP (Transmission Control Protocol) \u3068 UDP (User Datagram Protocol) \u3067\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u958b\u767a\u8005\u306f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u8981\u4ef6\u306b\u57fa\u3065\u3044\u3066\u9069\u5207\u306a\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u9078\u629e\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30d6\u30ed\u30c3\u30ad\u30f3\u30b0\u30bd\u30b1\u30c3\u30c8\u3068\u975e\u30d6\u30ed\u30c3\u30ad\u30f3\u30b0\u30bd\u30b1\u30c3\u30c8<\/strong>: Winsock \u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u958b\u767a\u8005\u306f\u30d6\u30ed\u30c3\u30ad\u30f3\u30b0 \u30e2\u30fc\u30c9\u307e\u305f\u306f\u975e\u30d6\u30ed\u30c3\u30ad\u30f3\u30b0 \u30e2\u30fc\u30c9\u306e\u3044\u305a\u308c\u304b\u3067\u30bd\u30b1\u30c3\u30c8\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002\u30d6\u30ed\u30c3\u30ad\u30f3\u30b0 \u30e2\u30fc\u30c9\u3067\u306f\u3001\u30bd\u30b1\u30c3\u30c8\u64cd\u4f5c\u306f\u30bf\u30b9\u30af\u304c\u5b8c\u4e86\u3059\u308b\u307e\u3067\u5f85\u6a5f\u3057\u307e\u3059\u304c\u3001\u975e\u30d6\u30ed\u30c3\u30ad\u30f3\u30b0 \u30e2\u30fc\u30c9\u3067\u306f\u64cd\u4f5c\u306f\u3059\u3050\u306b\u8fd4\u3055\u308c\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u975e\u540c\u671f\u30a4\u30d9\u30f3\u30c8\u3092\u51e6\u7406\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<h2>Windows Sockets API (Winsock) \u306e\u5185\u90e8\u69cb\u9020\u3068\u305d\u306e\u52d5\u4f5c<\/h2>\n<p>Winsock\u306fWinsock DLL\u3092\u901a\u3058\u3066\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u95a2\u6570\u306e\u30bb\u30c3\u30c8\u3068\u3057\u3066\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u901a\u4fe1\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u307e\u305aWinsock\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u521d\u671f\u5316\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 <code data-no-translation=\"\">WSAStartup<\/code> \u6a5f\u80fd\u3002\u3053\u306e\u30d7\u30ed\u30bb\u30b9\u306f\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u5fc5\u8981\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u3068\u30ea\u30bd\u30fc\u30b9\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u521d\u671f\u5316\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f <code data-no-translation=\"\">socket<\/code> \u95a2\u6570\u3092\u5b9f\u884c\u3057\u3001\u30a2\u30c9\u30ec\u30b9 \u30d5\u30a1\u30df\u30ea\u3001\u30bd\u30b1\u30c3\u30c8 \u30bf\u30a4\u30d7\u3001\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u30bd\u30b1\u30c3\u30c8 \u30bf\u30a4\u30d7\u306f\u3001SOCK_STREAM (TCP \u306e\u5834\u5408) \u307e\u305f\u306f SOCK_DGRAM (UDP \u306e\u5834\u5408) \u306e\u3044\u305a\u308c\u304b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30b5\u30fc\u30d0\u30fc\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3067\u63a5\u7d9a\u3092\u78ba\u7acb\u3059\u308b\u306b\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f <code data-no-translation=\"\">connect<\/code> \u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u30b5\u30fc\u30d0\u30fc\u306eIP\u30a2\u30c9\u30ec\u30b9\u3068\u30dd\u30fc\u30c8\u756a\u53f7\u306b\u63a5\u7d9a\u3057\u307e\u3059\u3002\u4e00\u65b9\u3001\u30b5\u30fc\u30d0\u30fc\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f <code data-no-translation=\"\">bind<\/code> \u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u30bd\u30b1\u30c3\u30c8\u3092\u30ed\u30fc\u30ab\u30ebIP\u30a2\u30c9\u30ec\u30b9\u3068\u30dd\u30fc\u30c8\u306b\u95a2\u9023\u4ed8\u3051\u3001\u6b21\u306b <code data-no-translation=\"\">listen<\/code> \u7740\u4fe1\u63a5\u7d9a\u8981\u6c42\u3092\u5f85\u6a5f\u3059\u308b\u6a5f\u80fd\u3002\u63a5\u7d9a\u8981\u6c42\u304c\u5230\u7740\u3059\u308b\u3068\u3001 <code data-no-translation=\"\">accept<\/code> \u95a2\u6570\u306f\u7740\u4fe1\u63a5\u7d9a\u3092\u53d7\u3051\u5165\u308c\u308b\u305f\u3081\u306b\u547c\u3073\u51fa\u3055\u308c\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3068\u306e\u901a\u4fe1\u7528\u306e\u65b0\u3057\u3044\u30bd\u30b1\u30c3\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u30ec\u30b9\u901a\u4fe1\u306e\u5834\u5408\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f <code data-no-translation=\"\">sendto<\/code> \u6a5f\u80fd\u3092\u4f7f\u7528\u3057\u3066\u30c7\u30fc\u30bf\u3092\u53d7\u4fe1\u3057\u3001 <code data-no-translation=\"\">recvfrom<\/code> \u95a2\u6570\u3002<\/p>\n<p>\u901a\u4fe1\u3092\u5b8c\u4e86\u3059\u308b\u305f\u3081\u306b\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f <code data-no-translation=\"\">closesocket<\/code> \u95a2\u6570\u3092\u547c\u3073\u51fa\u3057\u3066\u30bd\u30b1\u30c3\u30c8\u3092\u9589\u3058\u307e\u3059\u3002\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304cWinsock\u306e\u4f7f\u7528\u3092\u7d42\u4e86\u3059\u308b\u3068\u3001 <code data-no-translation=\"\">WSACleanup<\/code> \u30ea\u30bd\u30fc\u30b9\u3092\u89e3\u653e\u3059\u308b\u6a5f\u80fd\u3002<\/p>\n<h2>Windows Sockets API (Winsock) \u306e\u4e3b\u8981\u6a5f\u80fd\u306e\u5206\u6790<\/h2>\n<p>Windows Sockets API (Winsock) \u306b\u306f\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u958b\u767a\u3067\u5e83\u304f\u63a1\u7528\u3055\u308c\u3066\u3044\u308b\u3044\u304f\u3064\u304b\u306e\u91cd\u8981\u306a\u6a5f\u80fd\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>\n<p><strong>\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u72ec\u7acb\u6027<\/strong>Winsock \u306f Windows \u4e0a\u3067\u4e00\u8cab\u3057\u305f API \u3092\u63d0\u4f9b\u3059\u308b\u305f\u3081\u3001\u958b\u767a\u8005\u306f\u308f\u305a\u304b\u306a\u5909\u66f4\u3092\u52a0\u3048\u308b\u3060\u3051\u3067\u4ed6\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306b\u7c21\u5358\u306b\u79fb\u690d\u3067\u304d\u308b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30b3\u30fc\u30c9\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u67d4\u8edf\u6027<\/strong>Winsock \u306f\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u6307\u5411\u901a\u4fe1\u3068\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u30ec\u30b9\u901a\u4fe1\u306e\u4e21\u65b9\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u304a\u308a\u3001\u958b\u767a\u8005\u306f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u9069\u3057\u305f\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u67d4\u8edf\u306b\u9078\u629e\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30b9\u30b1\u30fc\u30e9\u30d3\u30ea\u30c6\u30a3<\/strong>: IPv4 \u3068 IPv6 \u306e\u4e21\u65b9\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b Winsock \u3067\u306f\u3001\u6b21\u4e16\u4ee3\u306e IP \u30d7\u30ed\u30c8\u30b3\u30eb\u3078\u306e\u79fb\u884c\u306b\u5408\u308f\u305b\u3066\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30b7\u30fc\u30e0\u30ec\u30b9\u306b\u62e1\u5f35\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u975e\u540c\u671fI\/O<\/strong>: Winsock \u306f\u975e\u30d6\u30ed\u30c3\u30ad\u30f3\u30b0 \u30bd\u30b1\u30c3\u30c8\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u304a\u308a\u3001\u8907\u6570\u306e\u63a5\u7d9a\u3092\u52b9\u7387\u7684\u306b\u51e6\u7406\u3057\u3001\u540c\u6642\u5b9f\u884c\u6027\u306e\u9ad8\u3044\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306e\u5fdc\u7b54\u6027\u3092\u9ad8\u3081\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u5e45\u5e83\u3044\u63a1\u7528<\/strong>Winsock \u306f\u958b\u767a\u8005\u306b\u5e83\u304f\u63a1\u7528\u3055\u308c\u3066\u304a\u308a\u3001\u8c4a\u5bcc\u306a\u30ea\u30bd\u30fc\u30b9\u3068\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u5099\u3048\u305f\u5927\u898f\u6a21\u306a\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u304c\u5f62\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<h2>Windows \u30bd\u30b1\u30c3\u30c8 API (Winsock) \u306e\u7a2e\u985e<\/h2>\n<p>Winsock \u306b\u306f\u3001Winsock 1.1 \u3068 Winsock 2.0 \u3068\u3044\u3046 2 \u3064\u306e\u4e3b\u8981\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u9593\u306e\u4e3b\u306a\u9055\u3044\u306f\u3001\u63d0\u4f9b\u3055\u308c\u308b\u6a5f\u80fd\u3068\u6a5f\u80fd\u30ec\u30d9\u30eb\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th><strong>\u7279\u5fb4<\/strong><\/th>\n<th><strong>\u30a6\u30a3\u30f3\u30bd\u30c3\u30af1.1<\/strong><\/th>\n<th><strong>\u30a6\u30a3\u30f3\u30bd\u30c3\u30af 2.0<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>\u975e\u540c\u671f\u6a5f\u80fd<\/strong><\/td>\n<td>\u975e\u540c\u671f I\/O \u64cd\u4f5c\u306e\u30b5\u30dd\u30fc\u30c8\u306f\u9650\u5b9a\u7684\u3067\u3059\u3002<\/td>\n<td>\u30aa\u30fc\u30d0\u30fc\u30e9\u30c3\u30d7\u3055\u308c\u305f\u975e\u30d6\u30ed\u30c3\u30ad\u30f3\u30b0\u64cd\u4f5c\u306e\u30b5\u30dd\u30fc\u30c8\u304c\u5f37\u5316\u3055\u308c\u307e\u3057\u305f\u3002<\/td>\n<\/tr>\n<tr>\n<td><strong>\u30d7\u30ed\u30c8\u30b3\u30eb\u306e\u72ec\u7acb\u6027<\/strong><\/td>\n<td>IPv6 \u306a\u3069\u306e\u65b0\u3057\u3044\u30d7\u30ed\u30c8\u30b3\u30eb\u306e\u30b5\u30dd\u30fc\u30c8\u306f\u9650\u5b9a\u7684\u3067\u3059\u3002<\/td>\n<td>IPv6\u3001Quality of Service (QoS) \u306a\u3069\u3092\u5b8c\u5168\u306b\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td><strong>\u30b5\u30fc\u30d3\u30b9 \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9 (SPI)<\/strong><\/td>\n<td>SPI\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002<\/td>\n<td>\u8907\u6570\u306e\u30c8\u30e9\u30f3\u30b9\u30dd\u30fc\u30c8 \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306e\u5171\u5b58\u3092\u53ef\u80fd\u306b\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td><strong>\u30de\u30eb\u30c1\u30ad\u30e3\u30b9\u30c8\u30b5\u30dd\u30fc\u30c8<\/strong><\/td>\n<td>\u30de\u30eb\u30c1\u30ad\u30e3\u30b9\u30c8\u306e\u30b5\u30dd\u30fc\u30c8\u304c\u5236\u9650\u3055\u308c\u3066\u3044\u308b\u304b\u3001\u307e\u305f\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002<\/td>\n<td>\u30de\u30eb\u30c1\u30ad\u30e3\u30b9\u30c8\u901a\u4fe1\u3092\u5b8c\u5168\u306b\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Winsock 2.0 \u306f\u6a5f\u80fd\u6027\u304c\u5411\u4e0a\u3057\u3001\u6700\u65b0\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8981\u4ef6\u3068\u306e\u4e92\u63db\u6027\u304c\u3042\u308b\u305f\u3081\u3001\u958b\u767a\u8005\u306f\u53ef\u80fd\u306a\u9650\u308a Winsock 2.0 \u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002<\/p>\n<h2>Windows Sockets API (Winsock) \u306e\u4f7f\u7528\u65b9\u6cd5\u3001\u4f7f\u7528\u306b\u95a2\u9023\u3059\u308b\u554f\u984c\u3068\u305d\u306e\u89e3\u6c7a\u7b56<\/h2>\n<p>Windows Sockets API (Winsock) \u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u624b\u9806\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li>\n<p><strong>\u521d\u671f\u5316<\/strong>: \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u3001Winsock\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u521d\u671f\u5316\u3059\u308b\u305f\u3081\u306b\u3001 <code data-no-translation=\"\">WSAStartup<\/code> \u6a5f\u80fd\u3002\u305d\u306e\u5f8c\u3001Winsock \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u4e92\u63db\u6027\u3092\u78ba\u8a8d\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30bd\u30b1\u30c3\u30c8\u306e\u4f5c\u6210<\/strong>: \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u3001 <code data-no-translation=\"\">socket<\/code> \u30a2\u30c9\u30ec\u30b9 \u30d5\u30a1\u30df\u30ea\u3001\u30bd\u30b1\u30c3\u30c8 \u30bf\u30a4\u30d7\u3001\u304a\u3088\u3073\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u6307\u5b9a\u3059\u308b\u95a2\u6570\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u63a5\u7d9a\u306e\u78ba\u7acb<\/strong>: \u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u6307\u5411\u901a\u4fe1\u306e\u5834\u5408\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f <code data-no-translation=\"\">connect<\/code> \u30b5\u30fc\u30d0\u30fc\u306b\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306b\u3001\u30b5\u30fc\u30d0\u30fc\u306f <code data-no-translation=\"\">bind<\/code> \u305d\u3057\u3066 <code data-no-translation=\"\">listen<\/code> \u7740\u4fe1\u63a5\u7d9a\u306e\u6e96\u5099\u3092\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30c7\u30fc\u30bf\u901a\u4fe1<\/strong>: \u30c7\u30fc\u30bf\u306f\u4ee5\u4e0b\u3092\u4f7f\u7528\u3057\u3066\u9001\u4fe1\u3067\u304d\u307e\u3059 <code data-no-translation=\"\">send<\/code>\/<code data-no-translation=\"\">sendto<\/code> \u304a\u3088\u3073\u53d7\u4fe1\u3057\u305f <code data-no-translation=\"\">recv<\/code>\/<code data-no-translation=\"\">recvfrom<\/code>\u975e\u30d6\u30ed\u30c3\u30ad\u30f3\u30b0 \u30e2\u30fc\u30c9\u3067\u306f\u3001\u958b\u767a\u8005\u306f\u975e\u540c\u671f\u30a4\u30d9\u30f3\u30c8\u3092\u51e6\u7406\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u7d42\u4e86<\/strong>: \u901a\u4fe1\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f <code data-no-translation=\"\">closesocket<\/code> \u30bd\u30b1\u30c3\u30c8\u3092\u9589\u3058\u3066 <code data-no-translation=\"\">WSACleanup<\/code> \u30ea\u30bd\u30fc\u30b9\u3092\u89e3\u653e\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<p>Winsock \u306e\u4f7f\u7528\u6642\u306b\u767a\u751f\u3059\u308b\u4e00\u822c\u7684\u306a\u554f\u984c\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ol>\n<li>\n<p><strong>\u30e1\u30e2\u30ea\u7ba1\u7406<\/strong>: \u30c7\u30fc\u30bf \u30d0\u30c3\u30d5\u30a1\u30fc\u306e\u30e1\u30e2\u30ea\u5272\u308a\u5f53\u3066\u3092\u8aa4\u3063\u3066\u51e6\u7406\u3059\u308b\u3068\u3001\u30e1\u30e2\u30ea \u30ea\u30fc\u30af\u3084\u30d0\u30c3\u30d5\u30a1\u30fc \u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u540c\u6642\u5b9f\u884c\u306e\u554f\u984c<\/strong>: \u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30bd\u30b1\u30c3\u30c8\u64cd\u4f5c\u306e\u4e0d\u9069\u5207\u306a\u540c\u671f\u306b\u3088\u308a\u3001\u30c7\u30fc\u30bf\u304c\u7834\u640d\u3057\u305f\u308a\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u30af\u30e9\u30c3\u30b7\u30e5\u3057\u305f\u308a\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u3068\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30a2\u30c9\u30ec\u30b9\u5909\u63db (NAT)<\/strong>: \u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u3084 NAT \u30c7\u30d0\u30a4\u30b9\u306b\u3088\u3063\u3066\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u304c\u30d6\u30ed\u30c3\u30af\u307e\u305f\u306f\u5909\u66f4\u3055\u308c\u3001\u901a\u4fe1\u306b\u5f71\u97ff\u304c\u53ca\u3076\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30bd\u30b1\u30c3\u30c8\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8<\/strong>: \u9069\u5207\u306a\u30bd\u30b1\u30c3\u30c8 \u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3092\u8a2d\u5b9a\u3057\u306a\u3044\u3068\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u5fdc\u7b54\u3057\u306a\u304f\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u3053\u308c\u3089\u306e\u554f\u984c\u306e\u89e3\u6c7a\u7b56\u3068\u3057\u3066\u306f\u3001\u9069\u5207\u306a\u30e1\u30e2\u30ea\u7ba1\u7406\u3001\u30ed\u30c3\u30af\u306a\u3069\u306e\u540c\u671f\u6280\u8853\u3001\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u3084 NAT \u30c8\u30e9\u30d0\u30fc\u30b5\u30eb\u3078\u306e\u5bfe\u51e6\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u5fdc\u7b54\u6027\u3092\u7dad\u6301\u3059\u308b\u305f\u3081\u306e\u9069\u5207\u306a\u30bd\u30b1\u30c3\u30c8 \u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u306e\u8a2d\u5b9a\u306a\u3069\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>\u4e3b\u306a\u7279\u5fb4\u3068\u985e\u4f3c\u7528\u8a9e\u3068\u306e\u6bd4\u8f03<\/h2>\n<p>Windows Sockets API (Winsock) \u3068\u985e\u4f3c\u306e\u7528\u8a9e\u306e\u30cb\u30e5\u30a2\u30f3\u30b9\u3092\u3088\u308a\u3088\u304f\u7406\u89e3\u3059\u308b\u305f\u3081\u306b\u3001\u4ed6\u306e 2 \u3064\u306e\u4e00\u822c\u7684\u306a\u30cd\u30c3\u30c8\u30ef\u30fc\u30af API \u3068\u6bd4\u8f03\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<ol>\n<li>\n<p><strong>BSD \u30bd\u30b1\u30c3\u30c8<\/strong>: BSD \u30bd\u30b1\u30c3\u30c8 API \u306f\u3001Winsock \u306e\u57fa\u76e4\u3067\u3059\u3002\u4e21\u65b9\u306e API \u306f\u3001\u30a2\u30c9\u30ec\u30b9\u6307\u5b9a\u306b\u95a2\u3057\u3066 Berkeley \u30bd\u30b1\u30c3\u30c8 API \u898f\u5247\u306b\u6e96\u62e0\u3057\u3066\u304a\u308a\u3001\u540c\u69d8\u306e\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001BSD \u30bd\u30b1\u30c3\u30c8\u306f\u4e3b\u306b Unix \u30d9\u30fc\u30b9\u306e\u30b7\u30b9\u30c6\u30e0\u3067\u4f7f\u7528\u3055\u308c\u3001Winsock \u306f Windows \u7528\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30bd\u30b1\u30c3\u30c8.io<\/strong>: Socket.io \u306f\u3001Web \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3068\u30b5\u30fc\u30d0\u30fc\u9593\u306e\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u53cc\u65b9\u5411\u901a\u4fe1\u3092\u53ef\u80fd\u306b\u3059\u308b JavaScript \u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002Winsock \u3068\u306f\u7570\u306a\u308a\u3001Socket.io \u306f Web \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5c02\u7528\u306b\u8a2d\u8a08\u3055\u308c\u3066\u304a\u308a\u3001\u7279\u5b9a\u306e\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0 \u30b7\u30b9\u30c6\u30e0\u306b\u306f\u7e1b\u3089\u308c\u307e\u305b\u3093\u3002Web \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0 \u30c1\u30e3\u30c3\u30c8\u3001\u901a\u77e5\u3001\u5171\u540c\u4f5c\u696d\u6a5f\u80fd\u306a\u3069\u306e\u6a5f\u80fd\u3092\u6709\u52b9\u306b\u3059\u308b\u305f\u3081\u306b\u3088\u304f\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<h2>Windows Sockets API (Winsock) \u306b\u95a2\u3059\u308b\u4eca\u5f8c\u306e\u5c55\u671b\u3068\u6280\u8853<\/h2>\n<p>\u30c6\u30af\u30ce\u30ed\u30b8\u306e\u9032\u6b69\u306b\u4f34\u3044\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8981\u4ef6\u3082\u9032\u5316\u3057\u7d9a\u3051\u307e\u3059\u3002Windows Sockets API (Winsock) \u306f\u3001\u3053\u308c\u3089\u306e\u5909\u5316\u306b\u5bfe\u5fdc\u3057\u3001\u65b0\u3057\u3044\u30d7\u30ed\u30c8\u30b3\u30eb\u306e\u30b5\u30dd\u30fc\u30c8\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u5f37\u5316\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u5411\u4e0a\u3092\u63d0\u4f9b\u3059\u308b\u3053\u3068\u304c\u671f\u5f85\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5229\u7528\u53ef\u80fd\u306a IPv4 \u30a2\u30c9\u30ec\u30b9\u306e\u67af\u6e07\u306b\u3088\u308a\u3001IPv6 \u306e\u5c0e\u5165\u306f\u307e\u3059\u307e\u3059\u91cd\u8981\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002Winsock \u306f\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c IPv6 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u30b9\u30e0\u30fc\u30ba\u306b\u79fb\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3001\u9577\u671f\u7684\u306a\u4e92\u63db\u6027\u3068\u30b9\u30b1\u30fc\u30e9\u30d3\u30ea\u30c6\u30a3\u3092\u78ba\u4fdd\u3059\u308b\u4e0a\u3067\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u307e\u3059\u3002<\/p>\n<p>\u3055\u3089\u306b\u3001\u9ad8\u6027\u80fd\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u9700\u8981\u304c\u9ad8\u307e\u308b\u306b\u3064\u308c\u3066\u3001Winsock \u3067\u306f\u30ab\u30fc\u30cd\u30eb \u30ec\u30d9\u30eb\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u30b5\u30dd\u30fc\u30c8\u3001\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8 \u30b9\u30a4\u30c3\u30c1\u306e\u524a\u6e1b\u3001\u30b9\u30eb\u30fc\u30d7\u30c3\u30c8\u306e\u5411\u4e0a\u306a\u3069\u306e\u6700\u9069\u5316\u304c\u5c0e\u5165\u3055\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u3092 Windows Sockets API (Winsock) \u3067\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u307e\u305f\u306f\u95a2\u9023\u4ed8\u3051\u308b\u65b9\u6cd5<\/h2>\n<p>\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068\u5b9b\u5148\u30b5\u30fc\u30d0\u30fc\u9593\u306e\u4ef2\u4ecb\u5f79\u3068\u3057\u3066\u6a5f\u80fd\u3057\u307e\u3059\u3002\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u3088\u308b\u30bd\u30b1\u30c3\u30c8\u547c\u3073\u51fa\u3057\u3092\u30a4\u30f3\u30bf\u30fc\u30bb\u30d7\u30c8\u3057\u3066\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u306b\u8ee2\u9001\u3059\u308b\u3053\u3068\u3067\u3001Windows Sockets API (Winsock) \u3068\u95a2\u9023\u4ed8\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u4ee3\u308f\u3063\u3066\u5b9b\u5148\u30b5\u30fc\u30d0\u30fc\u3068\u306e\u901a\u4fe1\u3092\u51e6\u7406\u3057\u307e\u3059\u3002<\/p>\n<p>Windows Sockets API (Winsock) \u3092\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30e6\u30fc\u30b6\u30fc\u306f\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u306e\u5f37\u5316\u3001\u5730\u7406\u7684\u5236\u9650\u306e\u56de\u907f\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3068\u8ca0\u8377\u5206\u6563\u306b\u3088\u308b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u5411\u4e0a\u306a\u3069\u306e\u5229\u70b9\u3092\u4eab\u53d7\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u95a2\u9023\u30ea\u30f3\u30af<\/h2>\n<p>Windows Sockets API (Winsock) \u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001\u6b21\u306e\u30ea\u30bd\u30fc\u30b9\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/winsock\/windows-sockets-start-page\" target=\"_new\" rel=\"noopener nofollow\">Microsoft Winsock \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/winsock\/windows-sockets-2\" target=\"_new\" rel=\"noopener nofollow\">Winsock 2.0 API \u4ed5\u69d8<\/a><\/li>\n<\/ul>","protected":false},"featured_media":470948,"menu_order":0,"template":"","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"class_list":["post-479686","wiki","type-wiki","status-publish","has-post-thumbnail","hentry"],"acf":{"faq_title":"Frequently Asked Questions about <mark>Windows Sockets API (Winsock): A Comprehensive Overview<\/mark>","faq_items":[{"question":"<strong>What is the Windows Sockets API (Winsock)?<\/strong>","answer":"<p>The Windows Sockets API, commonly known as Winsock, is a programming interface that allows developers to create networking applications on the Microsoft Windows operating system. It provides a standardized way for applications to communicate over a network, making it possible to establish connections, send and receive data, and manage network-related functions seamlessly.<\/p>"},{"question":"<strong>What is the history of Windows Sockets API (Winsock)?<\/strong>","answer":"<p>The origins of Winsock trace back to the early 1990s when the need for a consistent networking API on Windows arose. It was first publicly mentioned with the release of Windows 3.1 in 1992, which included the first implementation of the Winsock API. The development of Winsock was a collaborative effort by several organizations, including Microsoft, FTP Software, and Novell, with the aim of providing a unified API for networking tasks.<\/p>"},{"question":"<strong>How does the Windows Sockets API (Winsock) work?<\/strong>","answer":"<p>Winsock is implemented as a set of functions accessible through the Winsock DLL. The application initializes the library using the <code>WSAStartup<\/code> function and creates sockets to establish communication. It supports both connection-oriented (TCP) and connectionless (UDP) communication. Communication between sockets can be done using <code>send<\/code>\/<code>sendto<\/code> for data transmission and <code>recv<\/code>\/<code>recvfrom<\/code> for data reception. Finally, the application calls <code>closesocket<\/code> to close the socket and <code>WSACleanup<\/code> to release resources.<\/p>"},{"question":"<strong>What are the key features of Windows Sockets API (Winsock)?<\/strong>","answer":"<p>Winsock offers platform independence, flexibility with support for various protocols, scalability with IPv6 support, asynchronous I\/O capabilities, and wide adoption among developers, making it a robust and versatile networking API.<\/p>"},{"question":"<strong>What types of Windows Sockets API (Winsock) are available?<\/strong>","answer":"<p>Winsock provides two main versions: Winsock 1.1 and Winsock 2.0. Winsock 2.0 offers enhanced features such as better asynchronous functionality, support for newer protocols like IPv6 and Quality of Service (QoS), and the Service Provider Interface (SPI) for multiple transport providers.<\/p>"},{"question":"<strong>What are common problems and solutions related to Winsock usage?<\/strong>","answer":"<p>Common problems include memory management, concurrency issues, and dealing with firewalls and NAT traversal. Solutions involve proper memory allocation, synchronization techniques, handling firewall and NAT devices, and setting appropriate socket timeouts.<\/p>"},{"question":"<strong>How is Windows Sockets API (Winsock) compared to other networking APIs?<\/strong>","answer":"<p>Winsock is based on the BSD Sockets API convention and provides similar functionalities. However, BSD Sockets is primarily used on Unix-based systems, while Winsock is designed for Windows. On the other hand, Socket.io is a JavaScript library tailored for real-time communication in web applications.<\/p>"},{"question":"<strong>What are the future perspectives of Windows Sockets API (Winsock)?<\/strong>","answer":"<p>As technology advances, Winsock is expected to support new protocols, security enhancements, and performance optimizations. It will play a crucial role in enabling applications to transition smoothly to IPv6 networks and adapt to evolving networking requirements.<\/p>"},{"question":"<strong>How can proxy servers be used with Windows Sockets API (Winsock)?<\/strong>","answer":"<p>Proxy servers act as intermediaries between client applications and destination servers. By associating proxy servers with Winsock, users can enjoy enhanced privacy, bypass geo-restrictions, and improved network performance through caching and load balancing.<\/p>"},{"question":"<strong>Where can I find more information about Windows Sockets API (Winsock)?<\/strong>","answer":"<p>For more in-depth information, you can explore the Microsoft Winsock documentation at <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/winsock\/windows-sockets-start-page\" target=\"_new\">docs.microsoft.com<\/a> and the Winsock 2.0 API specification at <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/winsock\/windows-sockets-2\" target=\"_new\">docs.microsoft.com<\/a>.<\/p>"}]},"_links":{"self":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/wiki\/479686","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/wiki"}],"about":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/types\/wiki"}],"version-history":[{"count":0,"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/wiki\/479686\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/media\/470948"}],"wp:attachment":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/media?parent=479686"}],"curies":[{"name":"\u3046\u30fc\u3093","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}