{"blog_url":"https://so-wh.at/","provider_url":"https://hatena.blog","description":"\u7c21\u5358\u306aecho\u30b5\u30fc\u30d0\u3092\u4f5c\u3063\u305f\u3089\u3001Ctrl-C\u3067\u30b5\u30fc\u30d0\u304c\u843d\u3061\u306a\u3044\u3002 require 'socket' alive = true trap(:INT) { alive = false } TCPServer.open('echo') {|server| while alive Thread.fork(server.accept) {|sock| begin while s = sock.gets puts \":#{s}\" sock.write(s) end ensure sock.close unless sock.closed? end } end } server.accept\u3067\u30e1\u30a4\u30f3\u30b9\u30ec\u30c3\u30c9\u2026","version":"1.0","blog_title":"so what","published":"2007-06-03 00:00:01","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fso-wh.at%2Fentry%2F20070603%2Fp2\" title=\" echo\u30b5\u30fc\u30d0 - so what\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","image_url":null,"author_name":"winebarrel","title":" echo\u30b5\u30fc\u30d0","categories":["RUBY"],"author_url":"https://blog.hatena.ne.jp/winebarrel/","type":"rich","url":"https://so-wh.at/entry/20070603/p2","width":"100%","provider_name":"Hatena Blog"}