{"id":3130,"date":"2012-04-03T11:25:44","date_gmt":"2012-04-03T02:25:44","guid":{"rendered":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=3130"},"modified":"2012-04-03T23:54:16","modified_gmt":"2012-04-03T14:54:16","slug":"sock_seqpacket-%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9","status":"publish","type":"post","link":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=3130","title":{"rendered":"SOCK_SEQPACKET \u306e\u4f7f\u3044\u65b9"},"content":{"rendered":"<p>socket(2) \u306e man \u30da\u30fc\u30b8\u306a\u3069\u3092\u898b\u308b\u3068\u5206\u304b\u308a\u307e\u3059\u304c\u3001SOCK_STREAM, SOCK_DGRAM, SOCK_RAW \u306a\u3069\u3068\u540c\u3058\u4e26\u3073\u306b SOCK_SEQPACKET \u3068\u3044\u3046\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>IP \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3067\u306f\u666e\u901a\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u306a\u3044\u306e\u3067\u4f7f\u3063\u305f\u3053\u3068\u306e\u306a\u3044\u4eba\u3082\u591a\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u5b9f\u969b\u79c1\u308215\u5e74\u3050\u3089\u3044\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3084\u3063\u3066\u307e\u3059\u304c\u3001\u4f7f\u3063\u305f\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u3061\u3087\u3044\u3068\u5fc5\u8981\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u306e\u3067\u5099\u5fd8\u9332\u3082\u517c\u306d\u3066\u307e\u3068\u3081\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<h3>\u4ed5\u69d8<\/h3>\n<p>\u307e\u305a\u4ed5\u69d8\u304b\u3089\u3002\u8d64\u5730\u306f SOCK_STREAM \u3068\u540c\u3058\u6027\u8cea\u3067\u3001\u9752\u5730\u306f SOCK_DGRAM \u3068\u540c\u3058\u6027\u8cea\u3067\u3059\u3002<\/p>\n<style>\n.sockstream {\n background-color: #ffc0c0;\n}\n.sockdgram {\n background-color: #c0c0ff;\n}\n<\/style>\n<table border>\n<tr>\n<th><\/th>\n<th>SOCK_STREAM<\/th>\n<th>SOCK_DGRAM<\/th>\n<th>SOCK_SEQPACKET<\/th>\n<\/tr>\n<tr>\n<th>\u7a2e\u5225<\/th>\n<td class=\"sockstream\">\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u6307\u5411<\/td>\n<td class=\"sockdgram\">\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u30ec\u30b9<\/td>\n<td class=\"sockstream\">\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u6307\u5411<\/td>\n<\/tr>\n<tr>\n<th>\u9806\u5e8f\u6027<\/th>\n<td class=\"sockstream\">\u25cb<\/td>\n<td class=\"sockdgram\">\u00d7<\/td>\n<td class=\"sockstream\">\u25cb<\/td>\n<\/tr>\n<tr>\n<th>\u4fe1\u983c\u6027<\/th>\n<td class=\"sockstream\">\u25cb<\/td>\n<td class=\"sockdgram\">\u00d7<\/td>\n<td class=\"sockstream\">\u25cb<\/td>\n<\/tr>\n<tr>\n<th>\u8ee2\u9001\u5358\u4f4d<\/th>\n<td class=\"sockstream\">\u30d0\u30a4\u30c8\u30b9\u30c8\u30ea\u30fc\u30e0<\/td>\n<td class=\"sockdgram\">\u30c7\u30fc\u30bf\u30b0\u30e9\u30e0<\/td>\n<td class=\"sockdgram\">\u30c7\u30fc\u30bf\u30b0\u30e9\u30e0<\/td>\n<\/tr>\n<\/table>\n<p>\u8868\u3092\u898b\u308b\u3068\u5206\u304b\u308b\u901a\u308a\u3001\u307b\u307c SOCK_STREAM \u3068\u540c\u3058\u3067\u3059\u3002\u300cSOCK_STREAM \u306e\u30c7\u30fc\u30bf\u30b0\u30e9\u30e0\u7248\u300d\u3068\u8003\u3048\u3066\u304a\u304f\u306e\u304c\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<h3>AF_LOCAL (AF_UNIX) \u3067\u306e\u5b9f\u88c5<\/h3>\n<p>\u4ed5\u69d8\u306f\u4e0a\u306e\u3068\u304a\u308a\u306a\u306e\u3067\u3059\u304c\u3001\u5b9f\u88c5\u3068\u306a\u308b\u3068\u3044\u308d\u3044\u308d\u3068\u7d30\u304b\u3044\u8a71\u304c\u51fa\u3066\u304d\u307e\u3059\u3002\uff08\u306a\u304a\u3001\u3053\u3053\u3067\u306f AF_LOCAL \u306e\u8a71\u3060\u3051\u3057\u307e\u3059\uff09<\/p>\n<ul>\n<li>\u591a\u304f\u306e POSIX \u5b9f\u88c5\u306b\u304a\u3044\u3066\u3001\uff08AF_LOCAL \u3067\u306f\uff09SOCK_DGRAM \u306f\u9806\u5e8f\u6027\u3082\u4fe1\u983c\u6027\u3082\u6301\u3064\u3002\u3068\u3044\u3046\u304b\u3001\u305d\u3046\u3067\u306a\u3044\u5b9f\u88c5\u306f\u898b\u305f\u3053\u3068\u304c\u306a\u3044\u3002\u3064\u307e\u308a\u3001\u4e0a\u306e\u8868\u306b\u304a\u3051\u308b SOCK_SEQPACKET \u3068 SOCK_DGRAM \u3068\u306e\u5dee\u7570\u306f\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u6307\u5411\u304b\u3069\u3046\u304b\u3068\u3044\u3046\u70b9\u3060\u3051\u306b\u306a\u308b\u3002<\/li>\n<li>SOCK_SEQPACKET \u306f\u5b9f\u88c5\u3055\u308c\u3066\u3044\u306a\u3044\u74b0\u5883\u304c\u3042\u308a\u3001\u53e4\u3081\u306e OS \u3060\u3068\u4f7f\u3048\u306a\u3044\u3053\u3068\u304c\u3042\u308b\u3002NetBSD \u306a\u3093\u304b\u306f\u73fe\u6642\u70b9\u306e stable \u3067\u3042\u308b 5.0 \u3067\u3059\u3089\u4f7f\u3048\u305a\u30016.0-beta \u3067\u3088\u3046\u3084\u304f\u8ffd\u52a0\u3055\u308c\u305f\u3002\u307e\u305f\u3001\u30b0\u30b0\u3063\u3066\u307f\u308b\u3068 Mac OS X \u3060\u3068 socketpair() \u3067 SOCK_SEQPACKET \u304c\u4f7f\u3048\u306a\u3044\u3088\u3046\u306a\u8a18\u8ff0\u304c\u898b\u3064\u304b\u308b\u3002<\/li>\n<li>BSD \u306e\u5834\u5408\u3001\u30bd\u30b1\u30c3\u30c8\u30d0\u30c3\u30d5\u30a1\u304c\u57cb\u307e\u3063\u305f\u5834\u5408\u306e\u6319\u52d5\u304c SOCK_DGRAM \u3068 SOCK_SEQPACKET \u3067\u9055\u3046\u3002SOCK_DGRAM \u3060\u3068 select() \u7b49\u3067\u306f writable \u3068\u5831\u544a\u3055\u308c\u5b9f\u969b\u306b write \u3059\u308b\u3068 ENOBUFS \u3067\u30a8\u30e9\u30fc\u306b\u306a\u308b\u304c\u3001SOCK_SEQPACKET \u3060\u3068 writable \u3067\u306a\u304f\u306a\u308a\u5b9f\u969b\u306b write \u3059\u308b\u3068\u30d6\u30ed\u30c3\u30af\u3059\u308b\u3002Linux \u3060\u3068\u3069\u3061\u3089\u3067\u3082 writable \u3067\u306a\u304f\u306a\u308a\u5b9f\u969b\u306b write \u3059\u308b\u3068\u30d6\u30ed\u30c3\u30af\u3059\u308b\u3002<\/li>\n<\/ul>\n<p>SOCK_SEQPACKET \u306f\u30c7\u30fc\u30bf\u30b0\u30e9\u30e0\u578b\u3068\u3044\u3046\u70b9\u3067 SOCK_DGRAM \u3068\u4f3c\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u308c\u4ee5\u5916\u306e\u6027\u8cea\u306b\u3064\u3044\u3066\u306f SOCK_STREAM \u3068\u540c\u3058\u3067\u3059\u3002\u4e0a\u306e\u3068\u304a\u308a SOCK_DGRAM \u3067\u3082\u307b\u3068\u3093\u3069\u306e\u5b9f\u88c5\u3067\u306f\u4fe1\u983c\u6027\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u305d\u308c\u306f\u66f8\u304d\u8fbc\u307f\u306b\u6210\u529f\u3057\u305f\u3082\u306e\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b\u3053\u3068\u304c\u4fdd\u8a3c\u3055\u308c\u308b\uff08\u30ab\u30fc\u30cd\u30eb\u5185\u3067\u884c\u65b9\u4e0d\u660e\u306b\u306a\u3063\u305f\u308a\u3057\u306a\u3044\uff09\u3068\u3044\u3046\u3060\u3051\u3067\u3059\u3002\u6368\u3066\u3066\u306f\u3044\u3051\u306a\u3044\u30c7\u30fc\u30bf\u3092\u66f8\u304d\u8fbc\u3081\u306a\u304b\u3063\u305f\u3068\u304d\u306b\u518d\u8a66\u884c\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u79fb\u690d\u6027\u306e\u3042\u308b\u30a4\u30d9\u30f3\u30c8\u30c9\u30ea\u30d6\u30f3\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u5834\u5408\u306f\u3081\u3093\u3069\u304f\u3055\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002SOCK_SEQPACKET \u306a\u3089\u5358\u306b select() \u7b49\u3067\u5f85\u6a5f\u3059\u308c\u3070\u3044\u3044\u3060\u3051\u3067\u3059\u3002\u30ce\u30f3\u30d6\u30ed\u30c3\u30ad\u30f3\u30b0\u3067\u3042\u308b\u5fc5\u8981\u304c\u306a\u3044\u306a\u3089\u3001\u305d\u3082\u305d\u3082\u4f55\u3082\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u3068\u3044\u3046\u308f\u3051\u3067\u3001\u307f\u306a\u3055\u3093 SOCK_SEQPACKET \u306f\u3082\u3063\u3068\u4f7f\u3063\u3066\u3044\u3044\u3068\u601d\u3046\u306e\u3067\u3059\u3088\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>socket(2) \u306e man \u30da\u30fc\u30b8\u306a\u3069\u3092\u898b\u308b\u3068\u5206\u304b\u308a\u307e\u3059\u304c\u3001SOCK_STREAM, SOCK_DGRAM, SOCK_RAW \u306a\u3069\u3068\u540c\u3058\u4e26\u3073\u306b SOCK_SEQPACKET \u3068\u3044\u3046\u306e\u304c\u3042\u308a\u307e\u3059\u3002 IP \u30cd\u30c3\u30c8\u30ef\u30fc\u30af [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-3130","post","type-post","status-publish","format-standard","hentry","category-software"],"_links":{"self":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3130"}],"version-history":[{"count":12,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3130\/revisions"}],"predecessor-version":[{"id":3140,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3130\/revisions\/3140"}],"wp:attachment":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3130"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}