{"categories":["Perl"],"provider_url":"https://hatena.blog","version":"1.0","blog_url":"https://blog1.mammb.com/","url":"https://blog1.mammb.com/entry/20091124/1259074188","provider_name":"Hatena Blog","height":"190","author_name":"Naotsugu","author_url":"https://blog.hatena.ne.jp/Naotsugu/","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog1.mammb.com%2Fentry%2F20091124%2F1259074188\" title=\"\u3010\u3053\u308c\u3060\u3051\u899a\u3048\u308a\u3083\u306a\u3093\u3068\u304b\u4f7f\u3048\u308bPerl\u30e1\u30e29\u3011TCP\u30b5\u30fc\u30d0\u3068\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 - A Memorandum\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"\u3010\u3053\u308c\u3060\u3051\u899a\u3048\u308a\u3083\u306a\u3093\u3068\u304b\u4f7f\u3048\u308bPerl\u30e1\u30e29\u3011TCP\u30b5\u30fc\u30d0\u3068\u30af\u30e9\u30a4\u30a2\u30f3\u30c8","type":"rich","width":"100%","published":"2009-11-24 23:49:48","description":"\u65e5\u6642\u3092\u8fd4\u5374\u3059\u308bTCP\u30b5\u30fc\u30d0\u3068\u3001TCP\u30b5\u30fc\u30d0\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u4f8b\u3002tcp_server.pl #! /usr/bin/perl # \u65e5\u6642\u3092\u8fd4\u5374\u3059\u308bTCP\u30b5\u30fc\u30d0 use Socket; $port = shift || 9999; $proto = getprotobyname('tcp'); socket(ListenSock, PF_INET, SOCK_STREAM, $proto) or die(\"cannot open socket : $!\\n\"); bind(ListenSock, sockaddr_in($port, INADDR_ANY)) or dir(\"cannot\u2026","blog_title":"A Memorandum"}