{"id":734,"date":"2024-11-21T12:27:33","date_gmt":"2024-11-21T12:27:33","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=734"},"modified":"2024-11-25T14:03:52","modified_gmt":"2024-11-25T14:03:52","slug":"mwnci-socket-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-socket-function\/","title":{"rendered":"Mwnci socket() Function"},"content":{"rendered":"<h2>Syntax<\/h2>\n<p>socket<strong>(<em>string<\/em>)<\/strong><\/p>\n<h2>Description<\/h2>\n<p>The <i>socket()<\/i> function returns a file descriptor corresponding to the created socket.<\/p>\n<p>A socket is set using one of the following:<\/p>\n<pre>\r\n\"unix\"\r\n\"tcp4\"\r\n\"udp4\"\r\n\"tcp6\"\r\n\"udp6\"\r\n<\/pre>\n<h2>Example<\/h2>\n<pre>include(\"file\")\r\nfd = socket(\"tcp4\")\r\nbind(fd, \"0.0.0.0:8000\")\r\nlisten(fd, 1)\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax socket(string) Description The socket() function returns a file descriptor corresponding to the created socket. A socket is set using one of the following: &#8220;unix&#8221; &#8220;tcp4&#8221; &#8220;udp4&#8221; &#8220;tcp6&#8221; &#8220;udp6&#8221; Example include(&#8220;file&#8221;) fd = socket(&#8220;tcp4&#8221;) bind(fd, &#8220;0.0.0.0:8000&#8221;) listen(fd, 1)<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-734","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=734"}],"version-history":[{"count":3,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/734\/revisions"}],"predecessor-version":[{"id":740,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/734\/revisions\/740"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}