We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
下面的 ack_data 为何要使用 set 类型?
ack_data = {specify_stream[start + 4], specify_stream[start + 5]} if ack_data == {ack, seq}:
The text was updated successfully, but these errors were encountered:
当C->S时(seq=5,ack=6,len=10),PUSH一条请求,server端接收时,Flags_ack为1,且ack等于client的seq与请求len相加(seq=6,ack=15)==client(ack=6,seq=5+len);当S->C时(seq=5,ack=6,len=10),PUSH一条请求,client端接收时,Flags_ack为1,ack等于server的seq与请求len相加(seq=6,ack=15)==server(ack=6,seq=5+len),之前化分的较为细致,set无序的类型方便进行比较,修改后,未对此部分深入思考,经大神提醒发现,可以进行改善。
while start < len(specify_stream): flags_push = specify_stream[start + 6] & 0x08 # 8 flags_ack = specify_stream[start + 6] & 0x10 # 16 flags_fin = specify_stream[start + 6] & 0x01 # 1 seq, ack = specify_stream[start + 4], specify_stream[start + 5] if flags_fin: return reassemble_data if not (flags_ack and flags_push): start += 9 continue seq += len(specify_stream[start + 7]) start += 9 if seq == specify_stream[start + 5] and ack == specify_stream[start + 4]: reassemble_data.extend(specify_stream[start - 9:start])
Sorry, something went wrong.
No branches or pull requests
下面的 ack_data 为何要使用 set 类型?
The text was updated successfully, but these errors were encountered: