HTTP Connections

HTTP无状态协议和Connection长/短连接 目录 HTTP无状态协议 Connection 短连接: 长连接: HTTP无状态协议 1、定义:无状态是指协议对于事务处理没有记忆能力,服务器不知道客户端是什么状态。从另一方面讲,打开一个服务器上的网页和你之前打开这个服务器上的网页之间没有任何联系。 2、优点:服务器不用为每个客户端连接分配内存来记忆大量状态,也不用在客户端失去连接时去清理内存,以更高效地去处理web业务。 3... 阅读详情

What is HTTP?
The HyperText Transfer Protocol (HTTP) is the application protocol used by the web. This section assumes you have a basic understanding of HTTP version 1.1, as defined in RFC 2616. There is no standard way of using HTTP for interactive applications - the method described here is just the way Microsoft chose to do it. The method described here has nothing to do with the HTTP "CONNECT" method.

How does HTTP work with MSN?
Microsoft use gateway.messenger.hotmail.com, port 80, as their dispatch server for HTTP connections. Unlike messenger.hotmail.com this server has never been seen to transfer clients to another notification server. However, there is a transfer-like function in MSN's HTTP method.

Though HTTP is most often used for transferring HTML documents (hence the name), it's entirely capable of transferring any kind of data. In HTTP, there is no way for the server to send a message to the client without the client requesting it first. MSN Messenger clients send commands in the body of HTTP an request, and the server queues commands to send in the body of a response. When the client has no commands to send for a few seconds, it should "poll" the server for new messages. The official client polls the server once every two seconds.

Once a client has sent an HTTP request, it must wait for the response to come back before sending another request. For example, if you poll the server then send a command without waiting for the response to the poll, you will receive an HTTP 400 error (bad request).

Normally, a single connection to the server is kept alive throughout an MSN Messenger session, but the protocol seems to support a connection being broken and re-established without the session being affected. This has not yet been tested in practice, though.

In your initial profile, the "ClientPort" is set to 0 in an HTTP connection, and sending PNG will cause the server to send an HTTP error and disconnect you. Otherwise, the protocol works as normal.

HTTP Issues in the Official Client
Most of the testing for this page was done with version 5 of the official client, which has fairly poor support for HTTP connections, including several bugs and design flaws. Version 5 is the first even to make the option easily available, so it has presumably not been thoroughly tested. Hopefully, this will be improved in future versions.

The official client misbehaves badly when using HTTP proxies operating on a port other than 80. It doesn't always obey the "one request at a time" rule, so it occasionally gets kicked off with a 400 error. The configuration menu confusingly associates "using an HTTP proxy server" with "using a SOCKS proxy server". The proxy server in an HTTP session performs a completely different function to that in a SOCKS connection, and is most likely not required by the protocol. More seriously, some HTTP proxies are intercept and proxy HTTP connections without the client's knowledge. The official client can't handle these "transparent proxies" at all. Finally, if you specify an HTTP proxy server, the official client will ignore the setting to enable or disable its use. Instead, it will always try to connect directly to MSN Messenger first, then through HTTP if that fails.

Protocol Description
In an HTTP connection, commands are sent to MSN Messenger with POST requests to a CGI script, and received in responses to those commands. The initial request opens a new notification or switchboard server session, and (for a notification server session) should be sent to gateway.messenger.hotmail.com or (for a switchboard server session) the IP address given in an XFR. Commands you wish to send are contained in the entity-body, one per request (including one in the initial request). When there are no messages to send for a few seconds (two seconds in the official client), the client should poll the server for queued commands.

Server responses contain an "X-MSN-Messenger" header, which includes an IP address to send the next request to and a session ID to send with the next request. If the session is being closed, this header will also include a "Session=close" value. The session ID seems always to be a long number (which remains constant across a session), followed by a dot, then a short number (which changes with each response). Don't rely on this observation - treat it as an arbitrary string.

The official client tries to keep a single connection open throughout a session, though the session ID is presumably included in case a proxy server along the way closes the connection in the middle of a session. Assuming the server doesn't terminate your session when a connection is closed, you must send OUT to close your connection (or wait for a time-out on the server).

The script is /gateway/gateway.dll, and it takes the following arguments:

Action
Either "open" (to open a new session) or "poll" (to receive queued commands without sending any commands). Non-empty requests after the first don't include an "Action" parameter.
Server
Used with "Action=open" to specify the type of server to open. The value can be either "NS" (to open a Notification Server session) or "SB" (to open a switchboard session).
IP
Used with "Action=open" to specify the IP address or domain name of the server.
SessionID
Sent with every request after the first in a session, this is the string given in the previous response.
The official client sends "Proxy-Connection: Keep-Alive" and "Pragma: No-Cache" headers, which are HTTP/1.0 headers that have been replaced by "Connection: Keep-Alive" in HTTP/1.1. Presumably, these are included incase requests pass through old or buggy proxies on the way to the server. The official client also sends "User-Agent: MSMSGS", though the server doesn't discriminate based on the user-agent.

Examples Requests and Responses
Because the URLs in the HTTP examples are so large, having them on this page caused horizontal scrolling which caused difficulties in reading the information above. You may see the examples in this page.

eSPI总线与低速信号设计:从拓扑、阻抗到实测排障的完整指南 在数字电路设计中,信号完整性常被等同于高频高速设计,然而低速总线同样存在边沿陡峭、等效带宽高企的挑战。以eSPI总线为例,其时钟频率虽仅几十兆赫兹,但上升沿对应的有效带宽可达百兆赫兹级,走线阻抗、参考平面、回流路径与端接策略皆不可轻视。理解信号反射、振铃、地弹等基本机理,掌握PCB布线中的阻抗控制与拓扑优化方法,是保障系统稳定性的关键。这类技术广泛用于主板、平板及工控设备的EC与BMC通信,通信偶发失败往往源于多个细微因素的叠加。本文从eSPI总线的信号特征出发,系统梳理了从原理分析、叠层计算到实测波形解读 阅读详情

相关推荐

从 SAP Cloud Integration 到企业内网系统,Outbound HTTP Connections 的安全落地方法

摘要: 企业集成项目中,Cloud Integration的出站HTTP连接(Outbound HTTP Connections)常被低估,却是关键风险点。该链路涉及认证、证书、网络边界等问题,尤其在SAP系统与第三方平台(如银行、税务、物流)集成时尤为关键。 核心要点: 安全架构:避免直接暴露内网系统,推荐使用SAP Cloud Connector或Reverse Proxy(如SAP Web Dispatcher)作为中介,确保云端与内网的安全通信。 认证方式: Basic认证:简单但需配合HTTPS,

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 1108

HTTP CONNECT 方法

HTTP CONNECT 方法,代理(Proxy),隧道(Tunnel),反向代理,TCP协议,connect是通过TCP连接代理服务器的,Proxy-Authorization(身份验证的凭证),

weixin_39171666的博客 3248

ArcGIS渔网分割实战:用Create Fishnet快速生成1km×1km网格(附GDP数据分析案例)

本文详细解析了ArcGIS中Create Fishnet工具在渔网分割中的应用,从基础操作到GDP空间分析全流程。通过1km×1km网格的创建与优化,实现经济数据的空间标准化和可视化表达,解决数据融合与分析的三大核心痛点。

weixin_29250403的博客 303

解析HTTP协议中的CONNECT请求

HTTP(Hypertext Transfer Protocol)是一种用于传输超文本的应用层协议。它基于客户端-服务器模型,客户端发起请求,服务器返回响应。HTTP是无状态协议,每个请求都是独立的,服务器不会保留任何客户端的状态信息。

博客 8318

CXL技术入门:从PCIe到高性能计算的桥梁(附最新2.0协议解析)

本文深入解析CXL技术如何作为PCIe的进化版,成为高性能计算的关键桥梁,特别聚焦CXL 2.0协议的关键升级。从技术架构、三大子协议到典型应用场景,全面介绍CXL在缓存一致性、内存共享等方面的优势,帮助开发者快速掌握这一前沿技术。

wdx012345的博客 737

OpenPose 论文理解

OpenPose: Real-time multi-person keypoint detection library for body, face, hands, and foot estimation paper: Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields link: OpenPose paper...

JustForYou的博客 2万+

http请求头_connection字段(队头阻塞)

在http1.0中,每当客户端与服务端进行通信时(发送http请求时),http协议都会通过tcp建立起一个到服务器的连接,请求/响应后,关闭连接。一个页面中有多少个请求,就会通过tcp协议建立多少个连接进行信息交互。概念,如果页面中发起了多个http请求,此时只需要建立一个tcp连接就可以了,多个http请求响应会共用这一个tcp连接通道发送请求。http协议是应用层的半双工协议,tcp协议是传输层的全双工协议,无论哪个版本的http协议都是建立在tcp协议的基础之上的。http1.1引入了。

qq_43260366的博客 3703

ISP——坏点矫正(Defective Pixel Correction,DPC)

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录一、出现原因二、坏点分类三、矫正方法动态矫正1.PINTO算法2.梯度法3.DPC和demosaic结合法4.行检测法 一、出现原因 1.感光元件芯片自身工艺技术瑕疵造成以及长期使用造成的瑕疵; 2.光线采集存在缺陷; 二、坏点分类 1.hot pixel: 固定保持较高的像素值,一般呈现为画面高亮的点; 2.dead pixel: 固定保持较低的像素值,一般在画面中呈现为暗点; 3.noise pixel:信号强度随光照呈现的.

qq_41939460的博客 9437

HTTP connection

计算机网络

liuqinhou的博客 717

【LaTeX】IEEE会议模板中使用BibTex插入文献(解决报错:Something‘s wrong--perhaps a missing \item. \end{thebibliography}

使用IEEE会议论文LaTeX模板时遇到的一个错误,问题描述为:使用Texstudio编译LaTeX模板报错,报错信息提示为。出现的原因为IEEE会议论文模板自带的参考文献引用方式为手动插入,即不使用格式的参考文献,手动将参考文献调整为合适格式,然后粘贴到文本中,我准备将其换成方法引用参考文献。我的替换步骤为删除原始参考文献对应内容,即模板中的: 将以下函数添加到原始参考文献对应位置,对应上文新建的文件。 再次编译出现报错 删除文件夹中的文件 修改模板中的引用名称 引用方法为: 将 替换为 再次编译——

TangPlusHPC的博客 9938

基准电压 + 运放 + 低边MOS恒流源控制原理

因为恒流源强制 Iout不变,而 Vin​ 增加时,负载压降 Iout⋅Rload不变,多余的电压只能由MOS管的 VDS承担,因此 VDS必然增加。在饱和区,MOS 管的 ID 仅由 VGS决定,与 VDS 无关,这样,负载变化时,VDS可自由调整以维持 Iout恒定。当 Vin​ 小到无法满足 VDS>VGS−Vth时,MOS管进入线性区,Iout 会随 Vin​ 下降而减小,恒流失效。由于 Vref和 Rsense未变,Iout无需调整,运放无需动作,OUT保持不变,Iout恒定。

weixin_50643237的博客 2670

HTTP1.1 Notes 5, Connections

[color=blue][b]Persistent Connections[/b][/color] advantages: - By opening and closing fewer TCP connections, CPU time is saved in routers and hosts (clients, servers, proxies, gatewa...

hideto 154

华大HC32F460 ADC+DMA高效数据采集实战解析

本文深入解析了华大HC32F460微控制器中ADC与DMA协同工作的高效数据采集方案。通过实战代码演示,详细阐述了如何配置硬件触发、序列扫描及AOS事件联动,实现后台自动采集,从而解放CPU资源,提升系统实时性与可靠性,适用于传感器数据采集、音频处理等多种场景。

weixin_29189373的博客 184

Creating Sandboxed HTTP Connections

IntroductionStarting with Gecko 1.8.1 (Firefox 2), it is possible to create sandboxed HTTP connections which dont affect the users cookies. This article will cover the basics of

lionzl的专栏 948

【YOLOv11改进- 主干网络】YOLOv11+RepViT: 从ViT的角度重新审视Mobile的CNN助力YOLOv11有效涨点;

本文给大家带来的改进内容是在YOLOv11中更换主干网络为RepViT,助力YOLOv11有效涨点,论文通过集成轻量级 ViT 的高效架构设计,逐步增强了标准轻量级 CNN(即 MobileNetV3)的移动友好性。这最终产生了一个新的纯轻量级 CNN 系列的主干网络。

qq_41304809的博客 792

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

What is HTTP Persistent Connections?

What is HTTP Persistent Connections? HTTP persistent connections, also called HTTP keep-alive, or HTTP connection reuse, is the idea of using the same TCP connection to send and receive multiple HTTP

dong_pongkk999的专栏 898

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

Concurrent HTTP connections in Node.js

原文:https://fullstack-developer.academy/concurrent-http-connections-in-node-js/ ------------------------------------------------------------------------------------------ Browsers, as well...

weixin_30408309的博客 206

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

http persistent Connections 持久化连接

8.1持久连接( Persistent Connections) 8.1.1目的 在提出持久连接之前,每获取一个URL都有创建一个单独的TCP连接,不断的加重HTTP服务器的负担并导致网络的拥塞。使用内联的图片或者相关数据常常使得客户端在很短时间内发送众多的请求。问题分析和原型实现的结果的分析已经有了[26][30]。HTTP/1.1的实现的执行体验和测算都有很好的结果[39]。实现方

larance的挨踢生活 1723

HTTP Connection Management: KeepAlive, Persistent Connections, and More

1.背景介绍 在现代互联网中,HTTP(超文本传输协议)是一种广泛使用的应用层协议,它负责在客户端和服务器之间传输数据。在传输数据时,HTTP通常会建立和断开多个连接,这可能导致性能问题,尤其是在高负载下。为了解决这个问题,HTTP Connection Management(HTTP连接管理)技术被提出,它旨在优化连接的使用,提高网络性能。 在本文中,我们将讨论HTTP Connection...

AI天才研究院 821

HTTP: send http request through established TCP connections

Quote from here. getStr = 'GET / HTTP/1.1\r\nHost: www.google.com\r\n\r\n' request = IP(dst='www.google.com') / TCP(dport=80, sport=syn_ack[TCP].dport, seq=syn_ack[TCP].ack, ack=syn_...

weixin_33974433的博客 136

HTTP1.1 持久连接( Persistent Connections)

8.1持久连接( Persistent Connections)8.1.1目的在提出持久连接之前,每获取一个URL都有创建一个单独的TCP连接,不断的加重HTTP服务器的负担并导致网络的拥塞。使用内联的图片或者相关数据常常使得客户端在很短时间内发送众多的请求。问题分析和原型实现的结果的分析已经有了[26][30]。HTTP/1.1的实现的执行体验和测算都有很好的结果[39]。实现方式也

JonnyWei的专栏 9079

HTTP:The Definitive Guide 1.6 Connections

HTTP:The Definitive Guide 1.6 Connections 1.6.1 TCP/IP HTTP is an application layer protocol. HTTP doesn't worry about the nitty-gri...

aflwi06660的专栏 148

[Android Development] Using Http Connections

Some tips that one probably needs to pay attention to while developing android applications using http connections.

doodie1的专栏 382

HTTP长连接 Persistent Connections与Connection: Keep-Alive

参考: Persistent Connections:http://docs.oracle.com/javase/1.5.0/docs/guide/net/http-keepalive.html http持久连接-keep alive和persistent:http://www.jianshu.com/p/0a47fc776314 HTTP长连接:http://lzhw1985.it

yzpbright的博客 1447
上一篇: 关于MSNP协议的连接说明
下一篇: [转载]用.NET开发MSN聊天机器人|目前MSNP8协议不能用了,所以只作参考学习
大雨仔
博客等级 码龄23年 28粉丝 159原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值