×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    444

    Read Socket + KErrEof

    Hello all,

    I have created socket read and write application, which transfers the data using TCP/IP sockets through GPRS.
    For that there are two active objects one for reading and another for writing.
    The read active object continuously reads the socket.
    I found that when there is no data from remote side then my read object finish with KErrEof.
    There is not any connection closing issue from remote side.
    The other End has not closed. But what happens is that even if other end does not send any data the device side continues to read thus finding a EOF.

    Please let me know what should I have to do when I get this status in RunL().

    Regards,
    Kavit Patel.

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

    Re: Read Socket + KErrEof

    TCP/IP and KErrEof indicates that your socket is closed - it does not really matter if you do not want it to be closed... How sure are you about that the other end keeps the socket open? Can it happen that your writer AO happens to close the socket for some reason?

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    444

    Re: Read Socket + KErrEof

    Quote Originally Posted by wizard_hu_ View Post
    TCP/IP and KErrEof indicates that your socket is closed - it does not really matter if you do not want it to be closed... How sure are you about that the other end keeps the socket open? Can it happen that your writer AO happens to close the socket for some reason?
    Thanks wizard,
    What are the possible causes for my write AO closes the socket?
    Actually what I am doing is..
    Read AO continuously reading the socket while the write AO is activated only when there is a need to write to the socket (Till during write AO is active, read AO is also in running mode to read the same socket)
    I doubt that this is creating problem, am I?

    What should I have to do then in such cases?

    Regards,
    Kavit Patel.

  4. #4
    Super Contributor
    Join Date
    Jul 2007
    Location
    ShenZhen, China
    Posts
    4,346

    Re: Read Socket + KErrEof

    hi Kavit Patel, there has some reason cause KErrEof, maybe program bug, or maybe network event.

    in program bug, like wizard said, it maybe some logic cause your code close/shutdown the socket.

    in network, normally it is because remote server close the tcp/ip connection, and sometimes, it is cause by some gateway, etc, it will send you rst package, and symbian also notify you KErrEof.

    and whatever network reason, your code must need do this case, and need process, KErrCouldNotConnect, KErrDisconnected, etc.
    ----------------------------
    坚持学习, 坚持编码
    http://www.devdiv.net/
    qxiaoyuan

  5. #5
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    135

    socket reading and writing using multi active object

    i want to implement socket reading and writing using multi active object]

    right now i have implemented socket reading and writing using single active object


    plz help me out,as i have tried echoengine example but not working properly

Similar Threads

  1. Couldn't read from socket
    By lekkie in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2009-02-03, 10:05
  2. Cannot read from socket on N70
    By namrata in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2008-05-06, 09:42
  3. Socket Read Problem
    By NigelT in forum Symbian Networking & Messaging (Closed)
    Replies: 11
    Last Post: 2007-03-04, 17:10
  4. Read from a secure socket always returns data
    By barnabyg in forum Mobile Java General
    Replies: 1
    Last Post: 2006-07-02, 20:30
  5. How to find socket is ready to read ,write & accept
    By swathi_k in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2006-04-25, 08:01

Posting Permissions

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