MSN    м report [@author Ȳȣ rath@xrath.com]

  (1:  MIME޽   \r\n 2ȸ ߰ ־ Ѵ.)
  (2: MIME ̹Ƿ  property   .) 
  (3:   κп URL-Encode  ʿ䰡 , 
          UTF-8 ڵ ָ ȴ.)
 
  Ʒ 2 property ϼۼſ õ  MIME޽ 
  ԵǾ Ѵ.

  Mime-Version: 1.0
  Content-Type: text/x-msmsgsinvite; charset=UTF-8

   Content-Type property write, \r\n 1ȸ ƴ 2ȸ 
  ־ Ѵ.


       ʴ޽(Invitation-Command:INVITE) . 
  ؾ property Ʒ .

  [۽ڰ ߼]
  Application-Name:       
  Application-GUID: {5D3E02AB-6190-11d3-BBBB-00C04F795683}
  Invitation-Command: INVITE
  Invitation-Cookie: xxxxxx   (6ڸ )
  Application-File: ϰ ϴ  ̸
  Application-FileSize: ϰ ϴ  ũ(byte)


  ʴ븦  peer  Ǵ    ִ. 
 
   ޽ Ʒ .  

  [ڰ ߼]  
  Invitation-Command: ACCEPT  ( ڵ)
  Invitation-Cookie: 126174   (ʴ  Ű )
  Launch-Application: FALSE
  Request-Data: IP-Address:

   ޽ Ʒ .

  [ڰ ߼]  
  Invitation-Command: CANCEL  ( ڵ)
  Invitation-Cookie: 126174   (ʴ  Ű )
  Cancel-Code: REJECT         ( , TIMEOUT  ְ, Ȳ 
                                ڵ尪 Ѵ.)

      Ʈ ȴ. 
  ڰ  쿡 ۽ peer  Ʒ   
  Ѵ.

  [۽ڰ ߼]  
  Invitation-Command: ACCEPT  ( ڵ)
  Invitation-Cookie: 126174   (Ű )
  AuthCookie: 15148272        (ڿ    Ű[Ǽ])
  Launch-Application: FALSE   
  Request-Data: IP-Address:
  IP-Address: 192.168.1.10    (ڽ ip address)
  Port: 6891                  (ؾ port ȣ)

 Peer ۽ Peer   mime  
۽ peer IP-Address Portȣ    
ݷ  ְ޴´.

ȣ S:  
ȣ R:  
 ޽ ڴ CRLF.
(ߵҸ CCL̴.)

R: VER MSNFTP 
S: VER MSNFTP 
R: USR ${ڽLoginName} ${AuthCookie}
S: FIL ${FileSize}
R: TFR 
S: binary   Ѵ.

 ۽ տ 3 byte  Ѵ. 

ó κ 0 ܼ pad̰,   2Ʈ
little endian  ڷ Ŷ ũ̴.
׸ Ŷ ִ ũ 7FD̴. ᱹ
00 FD 07  Ѿ  . (̰ MTU   δ.)

[ڹ α׷Ӹ  ]
 , ѹ 2048 byte ۽ؾ ϴ ̴. ̰ ߿ϴ!
 msn ޽ readҶ,   ̸ ˻ ʰ,
  ѹ read Լ Ѵ. ׷Ƿ byte[2048] Ͽ 
 պκ 3Ʈ offset 0, 1, 2  ä, File  Ʒ  д´.
  BufferedOutputStream flush  Ѵٸ, Ʒ   
 ʿ䰡 .
 
 byte[] buf = new byte[ 2048 ];
 FileInputStream fis = new FileInputStream(file);
 int readlen;
 while( (readlen=fis.read(buf, 3, 2045))!=-1 )
 {
   buf[0] = 0;
   buf[1] = (byte)((readlen>>0) & 0xff);
   buf[2] = (byte)((readlen>>8) & 0xff);
   out.write( buf, 0, readlen+3 );
   out.flush();
 }
[ڹ α׷Ӹ   ]

 asciiڵ 0 3ȸ ־ ȴ.

R: BYE 16777989

  Ķʹ16777989  magic number Ѵ.
 ڰ ߸  ٸ,    ȵǾٴ 
޽ ް  ̴.
