{"image_url":null,"blog_url":"https://so-wh.at/","url":"https://so-wh.at/entry/20120128/p3","author_name":"winebarrel","height":"190","author_url":"https://blog.hatena.ne.jp/winebarrel/","provider_url":"https://hatena.blog","width":"100%","categories":["RUBY"],"version":"1.0","published":"2012-01-28 00:00:00","title":" EventMachine\u3067HTTPd","description":"\u91cd\u3044\u51e6\u7406\u306f\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u306b\u56de\u3059\u306e\u304c\u6b63\u89e3\u306a\u306e\u304b\u306a\u3002 \u57fa\u672c\u7684\u306bmutable\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5171\u6709\u306fNG\u306a\u6c17\u304c\u3059\u308b\u306a\u3002 #!/usr/bin/env ruby require 'rubygems' require 'eventmachine' class HTTP < EM::Connection def receive_data(data) operation = lambda do # \u91cd\u3044\u51e6\u7406\u3001\u3054\u306b\u3087\u3054\u306b\u3087\u2026 (<<-EOS).gsub(/\\r?\\n/,\"\\r\\n\") HTTP/1.1 200 OK <html> <head> <title>test</title> </head> <bod\u2026","blog_title":"so what","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fso-wh.at%2Fentry%2F20120128%2Fp3\" title=\" EventMachine\u3067HTTPd - 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>","type":"rich"}