Protocols/MSNP/MSNC/Transports

From NINA Wiki
Revision as of 19:11, 11 May 2022 by Animadoria (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
MSNP Protocol
MSNC
OverviewMSNObject
Client Capabilities
P2P protocol
TransportsMSNSLP
Headers
P2Pv1 Binary headers
P2Pv2 Binary headers
Transfers
Display Pictures
Custom Emoticons
File Transfer
Overview
IntroductionTermsClients
Reference
Error ListCommandsRelying Party SuiteSpotlife
Services
XMPPHTTP GatewayTabsActivities
Documentation
Development ToolsMSNP Grid
PolygamyURLs used by MSN
Documents
Protocol Versions
Version 21
Version 18
Version 16
Version 15
Version 14
Version 13
Version 12
Version 11
Version 9
Version 8
Version 2
MSNC
IntroductionP2PObject DescriptorDisplay PicturesFile Transfer
Scenarios
Microsoft Messenger for Mac
MSNP on WebTV (MSNTV)

Transports

The P2P protocol is designed to work independently of the "transport" - the way a message is sent. There are three known transports: switchboard, direct connection and TURN

Switchboard

Initially, P2P messages are sent over the same switchboard used by conversations, inside MSG messages with the following:

  • Acknowledge type set to D
  • Header Content-Type: application/x-msnmsgrp2p
  • HeaderP2P-Dest set to the p2p message recipient passport address.

A sample P2P message with the message header can look like this:

MSG 1 D 143
MIME-Version: 1.0
Content-Type: application/x-msnmsgrp2p
P2P-Dest: buddy1@hotmail.com
[52 bytes binary data]

Implementation details:

  • You should be able to request another switchboard if the switchboard is closed and there is a p2p conversation alive before sending a message, and continue the conversation.
  • Never hardcode the MSG headers in the p2p code, it's a big design mistake and you won't be able to switch transports.

This transport allows up to 1202 bytes per chunk (with a payload size near 1343 bytes)

Direct connection

After a negotiation, based on INVITE MSNSLP messages, a direct connection may be established.

That negotiation is described in File transfer

This transport allows up to 1352 bytes per chunk.

TURN

The Traversal Using Relay NAT (TURN) transport was added in MSNP15.