RubySPDY是SPDY协议的Ruby语言实现。
示例代码:
sr=SPDY::Protocol::Control::SynReply.newheaders={'Content-Type'=>'text/plain','status'=>'200OK','version'=>'HTTP/1.1'}sr.create(:stream_id=>1,:headers=>headers)send_datasr.to_binary_s#or,tosendadataframed=SPDY::Protocol::Data::Frame.newd.create(:stream_id=>1,:data=>"ThisisSPDY.")send_datad.to_binary_s
评论