百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

spdy

> 编程语言
开源

SPDY 是一个旨在降低网页延迟的协议

316 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

SPDY 是一个旨在降低网页延迟的协议

SPDY

SPDY is an experimental protocol designed to reduce latency of web pages. The SPDY v2 draft is the foundation for the HTTP 2.0 initiative led by the HTTPbis working group. In lab tests, SPDY shows 64% reduction in page load times! For more details, check out the official site.

Today, SPDY support is available in Chrome, Firefox, and Opera on the client, and on Apache, Nginx, Jetty, node.js and others on the server. All of Google web services, when running over SSL, are available through SPDY! In other words, if you are using Google products over SSL, chances are, you are fetching the content from Google servers over SPDY, not HTTP.

  • HTTPBis - HTTP 2.0 Charter
  • Life beyond HTTP 1.1: Google's SPDY

Protocol Parser

SPDY specification (draft 2) defines its own framing and message exchange protocol which is layered on top of a raw TCP connection. This gem implements a basic, pure Ruby parser for the SPDY v2 protocol:

ruby
s = SPDY::Parser.new

s.on_headers_complete { |stream_id, headers| ... }
s.on_body             { |stream_id, data| ... }
s.on_message_complete { |stream_id| ... }

s  'text/plain', 'status' => '200 OK', 'version' => 'HTTP/1.1'}
sr.create(:stream_id => 1, :headers => headers)
send_data sr.to_binary_s

# or, to send a data frame

d = SPDY::Protocol::Data::Frame.new
d.create(:stream_id => 1, :data => "This is SPDY.")
send_data d.to_binary_s

See example eventmachine server in examples/spdy_server.rb for a minimal SPDY "hello world" server.

License

MIT License - Copyright (c) 2011 Ilya Grigorik

Issues· 1 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言