test01@nate.com N 75
INVT test01@lycos.co.kr 211.234.239.209 5004 66AC3BC9125F388007B100EDD7C9
ENTR 0 test01@lycos.co.kr test01@nate.com%20으로%20이전했어요~ 장두현 66AC3BC9125F388007B100EDD7C9 UTF8 P 1.1 1

ENTR 0
JOIN 0 test01@nate.com [e??i??]%20/e³μ//e³μi￡¼e¨¸e??//i??e¸°e?¼i§//i?ⓒe¸?e?¼i§//e¹?i¹?//e??i?￢e??/ i?￥e??i??
WHSP 0 test01@nate.com AVCHAT2 OBJECT%090
WHSP 0 test01@nate.com DPIMG REQUEST%091|0|e¸°e³¸%09DPI00.bmp|24536|31:2147483647:514
WHSP 0 test01@nate.com FILE REQUEST%091%09FlashNote.ocx|77898|32:2147483647:550
QUIT 0 test01@nate.com

XXX 님이 파일을 전송합니다.
파일 전송의 일부 또는 전체가 사용자의 요청으로 취소(중단)되었거나, 파일을 전송(수신)할 수 없는 상태입니다.


[KMess 파일전송 분석]

["kmess/network/applications/p2papplication.cpp" 3991 줄 --29%--]

void P2PApplication::gotMessage(const P2PMessage &p2pMessage)
{
...
    else if(waitingState_ == P2P_WAIT_FOR_FILE_DATA
         && p2pMessage.getFlags() == 0
         && p2pMessage.isFragment())
    {
      // HACK: added for Kopete 0.9.2 code (has no flag set with data messages).
      kdWarning() << "P2PApplication: Expecting data message, "
                  << "got fragmented message with no flags set "
                  << "(assuming file data, contact=" << getContactHandle() << ")!" << endl;
      gotDataFragment(p2pMessage);
    }
...
}



[msnswitchboardconnection.cpp]
// Parse a message command
void MsnSwitchboardConnection::parseMessage(const QStringList& command, const MimeMessage &message)
{
...
  else if( contentType == "application/x-msnmsgrp2p" )
  {
...
    P2PMessage subMessage( message.getBinaryBody() );
    emit gotMessage( subMessage, contactHandle );
...
  }
}

[chatmaster.cpp]

  connect(connection, SIGNAL( gotMessage(const P2PMessage&,  const QString&) ),
          this, SLOT( slotGotMessage(const P2PMessage&,  const QString&) ));

// The switchboard received a Mime message
void ChatMaster::slotGotMessage(const MimeMessage &message, const QString &handle)
{
  ApplicationList *appList = getApplicationList(handle);
  if( appList != 0 )
  {
    appList->gotMessage(message);
  }
}

[applicationlist.cpp]
void ApplicationList::gotMessage(const P2PMessage &message)
{
...
  P2PApplication *p2pApplication = 0;
  unsigned long sessionID = message.getSessionID();
...
    p2pApplication = getApplicationBySessionId( sessionID );
...
  if( p2pApplication != 0 )
  {
    // Deliver the message
    p2pApplication->gotMessage( message );
  }

}


