Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User god_nirvana's Avatar
    Join Date
    Aug 2004
    Posts
    17
    I send a file through socket,gprs, from one mobilephone to another, and the receiving function is RecvOneMore. i can receive the context of the file, but how can I know whether the file has been totally received?

  2. #2
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,672
    for example: you could communicate the incoming file size before sending the file, or you could put the file size identifier before the file in your message..

    yucca

  3. #3
    Regular Contributor alokkumarsingh's Avatar
    Join Date
    Mar 2004
    Location
    India
    Posts
    67
    Hi,
    I m estabilishing the socket connection and able to suceesfully dowload a file.
    Everything is on right track but somehow when i trying to delete that socket objects, My code get paused and did not execute further,
    And specifically when i am trying to delete the SocketWriter object it happens. This SocketWriter is my class...which writes the http request.
    Im using the SDK example code of socket version 6.0 for 3650.I had modified that and used it.
    See its like that in my SocketsEngine class where i try to Disconnect the socket connection.....

    void CSocketsEngine:isconnect()
    {
    __ASSERT_ALWAYS(iEngineStatus == EConnected, User::Panic(KPanicSocketsEngine, ESocketsBadState));
    // cancel all outstanding operations
    // since we are connected, the only possibilities are read and write
    iSocketsReader->Cancel();
    iSocketsWriter->Cancel();
    iSocket.Close();
    }

    and when it comes to line....... iSocketsWriter->Cancel().... then
    In DoCancel() of SocketWriter

    void CSocketsWriter:oCancel()
    {
    // Cancel asychronous write request
    iSocket.CancelWrite();
    iTimer->Cancel();
    iWriteStatus = EWaiting;
    }

    It executes first two statements ...BUT when it executes ....iWriteStatus = EWaiting;
    ...my control stops and does not move further. Actually it pauses.

    And one more thing if i write a dailog before calling the Disconnect() in SocketEngine class............then everything works fine without any problem and pauses.
    Please guide my way through.
    Thanks
    -Alok

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved