Skip to content

dfcfw/spdy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPDY

A multiplexed stream library.

尚未实现 流量控制stream 并发数控制stream 读写超时控制

帧格式

0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Flag     |                  Stream ID                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Stream ID   |          Data Length          |     Data      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             Data                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Flag: uint8

Stream ID: uint32

Data Length: uint16

Data: 变长,由 Data Length 决定

SYN - 新建连接

SYN 为变长帧,代表新建虚拟连接

FIN - 结束连接

FIN 为虚拟连接的最后一帧,收到 FIN 则代表对方已经断开了虚拟连接,

FIN 帧为定长帧(7 bytes),只能包含 Flag Stream ID Data Length 信息,且 Data Length 填充为 0

DAT - 数据报文

参考链接

spdystream

yamux

smux

muxado

multiplex

About

A multiplexed stream library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages