Logo Search packages:      
Sourcecode: nateon version File versions  Download package

void KNateon::slotGotREQCNEW ( const QStringList &  slCommand  )  [private, slot]

P2P 서버에서 ATHC를 받으면

P2P 서버에서 새 클라이언트 접속이 오면,

파일 보내기. CTOC 0 user01@nate.com 41 REQC NEW 192.168.0.1:5004 10008348086:1105

내가 client로 상대 서버에 접속했음.

Server이면 ATHC로 상대가 P2PCookie를 보내나, Client일때는 직접 Setting 해야 함.

파일 전송창

Definition at line 6415 of file knateon.cpp.

References CurrentAccount::getMyID(), and m_pFileTransfer.

Referenced by initializeNateonDPConnection().

{
//     if ( isP2PActivedP2PCookie( slCommand[7] ) )
//         return;

    QStringList slServerInformation = QStringList::split( ":", slCommand[6] );
    kdDebug() << "Connecting - IP:" << slServerInformation[0] << ", Port:" << slServerInformation[1] << endl;

    NOMP2PBase *pBase = m_pP2PList->add( new NOMP2PBase( this, "p2pbase" ) );
    connect( pBase, SIGNAL( IncomingMessage( const QString & ) ), m_pNetworkWindow, SLOT( addIncomingServerMessage( const QString & ) ) );
    connect( pBase, SIGNAL( OutgoingMessage( const QString & ) ), m_pNetworkWindow, SLOT( addOutgoingServerMessage( const QString & ) ) );
    pBase->setType( NOMP2PBase::SEND );
    pBase->setConnectType( NOMP2PBase::CLIENT ); /*! 내가 client로 상대 서버에 접속했음. */
    pBase->setP2PCookie( slCommand[7] ); /*! Server이면 ATHC로 상대가 P2PCookie를 보내나, Client일때는 직접 Setting 해야 함. */
    pBase->connectToServer( slServerInformation[0], slServerInformation[1].toInt() );
    
    QString sCommand;
    sCommand = "ATHC";
    sCommand += "|";
    sCommand += m_pCurrentAccount->getMyID();
    sCommand += " ";
    sCommand += slCommand[2];
    sCommand += " ";
    sCommand += slCommand[7];
    sCommand += " ";
    sCommand += QString::number( 6004 );
    sCommand += " ";
    sCommand += "0";
    sCommand += "\r\n";
    
    pBase->addQueue( sCommand );

    /*! 파일 전송창 */
    connect( pBase, SIGNAL( updateProgress( const QString &, const unsigned long) ) , m_pFileTransfer, SLOT( updateProgressByByte( const QString&, const unsigned long ) ) );
    connect( pBase, SIGNAL( endProgress( const QString & ) ), m_pFileTransfer, SLOT( endProgressByByte( const QString & ) ) );
}


Generated by  Doxygen 1.6.0   Back to index