×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    7

    How to flush data on socket write

    Hi,

    I have written a small middleware application in Symbian C++ that relays communication bwteen a java app on phone and another java app on PC. On phone, java app and Symbian app comm over sockets. My problem is that I can't get java app to receive anything from the socket to which the symbian app is writing. Following is a graphical rep. of the problem -

    Java App (PC) Symbian App (phone) Java App(phone)

    <-------- <-------
    ----------> ----X--->

    I can't get the ------------> direction working between Symbian app and java app on phone.

    I think the problem is that a write doesn't go through till buffers fill up. But I didn't find any flush method for RSocket class. I tried to set the TCP option to No Delay by SetOpt, but the app started crashing on my Nokia 3650.

    Any suggestions! I know the data is receiving till symbian app since I printed it on console.

  2. #2
    Registered User
    Join Date
    May 2003
    Posts
    7
    I got the problem. At the java app on phone, I was trying to see whether there is any data or not using outputStream.available(). I guess the implementation of it is not correct. Once removed and a direct read solved the problem.


    This case can be deleted now.

Posting Permissions

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