msnp-wiki/docs/commands/xfr.md

87 lines
2.2 KiB
Markdown
Raw Normal View History

# Introduction
`XFR` is a command introduced with [MSNP2](../versions/msnp2.md).
It is a Dispatch Server and Notification Server command, without either a request or response payload.
It tells the client what server to connect to for the request.
# Client/Request
`XFR TrID server-type`
Where `server-type` is either `SB` (for a switchboard server), or `NS` (for a new Notification server).
# Server/Response
## XFR NS
`XFR TrID NS address:port {0} {current-server}`
Where `address:port` is the server you have requested or being referred to is.
In [MSNP3](../versions/msnp3.md) or higher, `0` is always 0.
In [MSNP7](../versions/msnp7.md) or higher, `current-server` is the current server you are connected to.
## XFR SB
`XFR TrID SB address:port authentication-method authentication-parameter`
Where `address:port` is the server you have requested is.
Where `authentication-method` is always `CKI`.
Where `authentication-parameter` is the "cookie" you need to log in to Switchboard.
# Examples
## Client requests a new Switchboard connection
```
C: XFR 1 SB
S: XFR 1 SB 10.0.1.200:1865 CKI 123456789.123456789.123456789
```
## Client requests a new Notification server
*Only used as-is in Beta 2 as the first command sent to a Dispatch Server.*
```
C: XFR 2 NS
S: XFR 2 NS 10.0.0.5:1863
```
Client disconnects from server
Client opens a connection to 10.0.0.5:1863
## Client referred from Dispatch Server
### Very Old
*Only in [MSNP2](../versions/msnp2.md) Exclusively.*
```
C: USR 3 MD5 I example@hotmail.com
S: XFR 3 NS 10.0.0.5:1863
```
Client disconnects from server
Client opens a connection to 10.0.0.5:1863
### Classic
*Only in [MSNP3](../versions/msnp3.md) to [MSNP6](../versions/msnp6.md).*
```
C: USR 4 MD5 I example@hotmail.com
S: XFR 4 NS 10.0.0.5:1863 0
```
Client disconnects from server
Client opens a connection to 10.0.0.5:1863
### Modern
*Since [MSNP7](../versions/msnp7.md).*
```
C: USR 5 MD5 I example@hotmail.com
S: XFR 5 NS 10.0.0.5:1863 0 10.0.0.1:1863
```
Client disconnects from server
Client opens a connection to 10.0.0.5:1863
# Known changes
* [MSNP3](..versions/msnp3.md) adds a new parameter that is always 0.
* [MSNP7](..versions/msnp7.md) adds a new parameter that is the current server you are connected to.