Discussion Board

Results 1 to 3 of 3
  1. #1
    Super Contributor
    Join Date
    Jun 2004

    Question Is this possible using sockets??

    I have two my app where in one will act as a server and another as a client.
    The server waits for connections from clients and recieves files from the clients.
    The file transfer is working fine.
    But now as the server is only reciveing and client only sending, its just
    one -way traffic. But I want to implement a disconnect from both sides.
    Basically I want to send a command to the seding app from the recieving app so that both of them disconnect cleanly.
    For this my idea is to toggle between send and recieve calls on the socket.
    1) Is this possible in first place using sockets? Do I need TCP sockets or do I need to use UDP sockets?
    2) How can I set a timeout on the recieve so that I just wait for some time
    and later go back to the sending mode?
    3) Also when I am not recieving but the other end is sending will the data
    remain in my devices buffer till I do a recv?
    Any ideas abt how to implement this?

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    have youi checked the sockets example ?

    It implements separate active objects for sending & receiving, so that would be a good place to start with.


  3. #3
    Registered User
    Join Date
    Feb 2004
    You cannot rely that the mobile has a public IP adress, unless you want to limit yourself to certain operator and connection type. Most gprs networks are behind NAT, so you do not get incoming connection to the mobile

    You may not be able to receive UDP for the forementioned reason.

    I would suggest you to implement a polling client on the mobile and server on internet side.

Posting Permissions

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