×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    64

    Question about Flash Lite

    Hi,

    I use socket for communication between flash app and C++ app,

    Flash code:
    loadVariables("http://127.0.0.1:9999/explorecard", _root);

    C++ code:
    RSocket::Listen(),RSocket::Accept(),RSocket::RecvOneOrMore(),
    RSocket::CancelAll(),RSocket::Close()....

    Basiclly, it works, flash app could send command to C++ app, but every time when flash app send a command, it show following:

    Internet:
    Unable to connect to network. Try again later.(-190)

    It seems, C++ app don't return wright content to flash, what should C++ app do after receiving a command?

    My handset is N77,FL1.1,S60_3rd

    Thank you!

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,740

    Re: Question about Flash Lite

    Personally I do not know FlashLite, but it apparently opens a http connection, thus it probably expect a http-compliant answer from your Symbian code.
    Check if documentation for 'loadVariables' says something about the expected format. And also check HTTP protocol specs (search for HTTP RFC with Google).

  3. #3
    Regular Contributor
    Join Date
    Dec 2006
    Posts
    123

    Re: Question about Flash Lite

    Quote Originally Posted by zhangwei_Nirvana View Post
    Hi,

    I use socket for communication between flash app and C++ app,

    Flash code:
    loadVariables("http://127.0.0.1:9999/explorecard", _root);

    C++ code:
    RSocket::Listen(),RSocket::Accept(),RSocket::RecvOneOrMore(),
    RSocket::CancelAll(),RSocket::Close()....

    Basiclly, it works, flash app could send command to C++ app, but every time when flash app send a command, it show following:

    Internet:
    Unable to connect to network. Try again later.(-190)

    It seems, C++ app don't return wright content to flash, what should C++ app do after receiving a command?

    My handset is N77,FL1.1,S60_3rd

    Thank you!
    You close socket everytime you recv data?I have tested flash + c++ on N80 or N 93.They are all OK!

  4. #4
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    64

    Re: Question about Flash Lite

    yeh, I close it everytime I recv data, following is my C++ code:

    void CHttpServer::RunL()
    {

    switch (iState)
    {

    case EAccepting:

    if (iStatus == KErrNone)
    {

    iServerSocket.RecvOneOrMore(iResponseChunk, 0, iStatus, iResponseChunkSizePkg) ;

    iState = EReceiving ;
    }
    else iState = EFailed ;
    break ;

    case EReceiving:
    if (iStatus == KErrNone)
    {
    for(TInt copyPtr = 0;
    (copyPtr < iResponseChunk.Length()) &&
    (iResponse.Length() <
    iResponse.MaxLength());
    copyPtr++)
    {
    TChar ch = iResponseChunk[copyPtr];

    iResponse.Append (iResponseChunk[copyPtr]);
    }
    TInt r = iResponse.Find(_L8("\r\n\r\n"));
    if ((iResponse.Length() == iResponse.MaxLength())||
    (r!=KErrNotFound))
    {

    iState = EComplete ;
    }
    else
    {
    iResponseChunk.Zero() ;
    iServerSocket.RecvOneOrMore(iResponseChunk, 0, iStatus, iResponseChunkSizePkg) ;
    }
    }
    else if (iStatus == KErrEof)
    {

    iState = EComplete ;

    }
    else
    {
    iState = EFailed ;

    }

    if((iState == EFailed)||(iState == EComplete))
    {
    iOberserver->HandleRequst(iResponse);
    iServerSocket.CancelAll();
    iServerSocket.Close();
    User::LeaveIfError(iServerSocket.Open(iSockServer));
    iSocket.Accept(iServerSocket, iStatus);
    iState = EAccepting;

    }
    break ;

    }
    SetActive() ;
    }


    I just iServerSocket.CancelAll();iServerSocket.Close(); after recv data, could you tell me how you close your socket?

    Thank you!

Similar Threads

  1. Nokia N958GB Flash Lite 3.0 XMLSocket Bug (Firmware v15.0.015)
    By ryan_at_frog in forum [Archived] Flash Lite on Nokia Devices
    Replies: 13
    Last Post: 2009-10-26, 22:08
  2. Flash Lite eSeminar: Predictive Mobile Search comes to Flash Lite
    By biskero in forum [Archived] Flash Lite on Nokia Devices
    Replies: 0
    Last Post: 2008-04-17, 14:03
  3. Flash lite 1.x and Databases
    By abolfoooud in forum [Archived] Flash Lite on Nokia Devices
    Replies: 7
    Last Post: 2008-04-15, 13:56
  4. series 40 Flash lite 2 and video.seek()
    By hp3 in forum [Archived] Flash Lite on Nokia Devices
    Replies: 2
    Last Post: 2008-01-31, 18:38
  5. Replies: 2
    Last Post: 2007-04-17, 13:32

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×