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 年 1095

HTTP CONNECT 方法

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

weixin_39171666的博客 3245

技能伤害继承英雄属性【War3地图编辑器】

风暴之锤跟随山丘之王的力量增长

ArYe 2297

解析HTTP协议中的CONNECT请求

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

博客 8306

AD创建属于自己的元件库(详细)

我今天开始学习AD2022,但是我想自己创建属于自己的元件库,但是奈何找了好多教程就是随便几句话就把我打发走了,弄了一天都没搞定(也许是我比较菜),所以现在乱懂了,自己写一个属于我们自己小白的教程,希望有用吧哈哈我比较偷懒,直接使用嘉立创上画好的元件导入,和我们自己创建自己画的步骤其实都一样。

qq_33591173的博客 2万+

解决MATLAB2020B关于找不到vs2019C++编译器问题

解决MATLAB2020B关于找不到vs2019C++编译器问题

wcm2577的博客 7605

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

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

qq_43260366的博客 3699

matlab中高频变压器怎么找,干货|手把手教你绕制高频变压器

原标题:干货|手把手教你绕制高频变压器绕制一个变压器所需材料:磁芯、骨架、各种铜线、麦拉胶带。变压器参数:磁芯:EE22原边:134T(1-3脚),辅助:32T(5-4脚),输出:15T(10-9脚)原边电感:1380±10%uH漏感:≤44uH引脚分布图: 特别注意:绕制方法为网上下载,其中变压器绕制方法是对的,但其中存在着很多问题(比如,正规变压器的绕组的头和尾是要添加铁氟龙套管的,每一层之间...

weixin_30895121的博客 2123

HTTP connection

计算机网络

liuqinhou的博客 717

Trae+Playwright MCP自动化测试全流程指南:从环境搭建到智能体运行

本文提供了一份详细的Trae与Playwright MCP集成指南,涵盖从Node.js、Python环境搭建到智能体创建的全流程。通过结合MCP协议,AI智能体能够理解任务并驱动Playwright执行复杂的浏览器自动化操作,实现从网页数据抓取到端到端测试的智能工作流。

banana的博客 531

Immich vs Nextcloud照片管理实测:自建私有云相册到底选哪个?

本文深度评测了Immich与Nextcloud在私有云相册管理中的表现,涵盖核心功能、性能基准、本土化实践及进阶功能。Immich凭借微服务架构和AI优化在照片管理、移动端体验上表现优异,而Nextcloud则强在生态整合。文章还提供了Docker部署优化和国内网络适配方案,帮助用户根据需求选择最佳方案。

seed的博客 324

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 153

AI智能体赋能Cypress:自动化前端测试的新范式

自动化测试是现代软件工程保障质量的核心实践,其原理是通过脚本模拟用户操作,对软件功能进行验证。随着大语言模型(LLM)和智能体(Agent)技术的发展,测试自动化正迈向智能化新阶段。智能体能够理解自然语言描述的测试需求,并自主规划、执行测试步骤,这为应对前端UI频繁变更、测试用例维护成本高等挑战提供了新思路。在工程实践中,将Cypress这一流行的前端测试框架封装为智能体可调用的标准化技能(Skill),是实现这一愿景的关键。通过设计清晰的交互协议和状态管理机制,智能体可以像人类测试工程师一样“感知”页面状

weixin_33726318的博客 686

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的专栏 947

将任意文件转换为Pcap网络数据包传输

一款实用的工具用于将任意文件转换为pcap网络数据包

村中少年的专栏 3188

精雕软件(JDpaint) 5.5 绿色版

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

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的专栏 897

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

Concurrent HTTP connections in Node.js

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

weixin_30408309的博客 205

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

http persistent Connections 持久化连接

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

larance的挨踢生活 1719

HTTP Connection Management: KeepAlive, Persistent Connections, and More

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

AI天才研究院 818

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的专栏 9077

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的专栏 145

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

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值