×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    5

    Communication - TCP UDP

    I am currently trying to port some code to symbian and would like to do some P2P stuff over symbian phones. Can you please point me to some sample code that works on symbian. I am using the latest SDK and we plan to use UDP protocol for communication. Also we have an idea of having a registration server that will initially communicate the list of users in the vicinity - Is there any support for webservice calling from symbian code...the webservice will be simple and return somethng like <node1>:<ip address>,<node2>:<ipaddress>..and so on.

    -JP

  2. #2
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Communication - TCP UDP

    i guess you will need to develop this web service yourself.

    as far as connection goes:
    1. you could use http over tcp - http engines are available, so you only need to worry on the data part.

    2. Sockets and tcp is another option.

    3. sockets with UDP is another, here you sould be ready for packet loss...

    also p2p stuff will also work via internet? in that case, i prefer it to be socket and tcp.
    Amit Kankani
    Nokia Developer Champion

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

    Re: Communication - TCP UDP

    Some open source P2P projects are available from our department:
    - Symella (Gnutella implementation for S60): symella.aut.bme.hu
    - SymTorrent (guess what): symtorrent.aut.bme.hu

  4. #4
    Registered User
    Join Date
    Oct 2008
    Posts
    5

    Re: Communication - TCP UDP

    Hi Guys,

    Thanks for your input. In terms of the current code we are using sockets provided by SDL_net in the PC world. The protocol in use is UDP. Can someone provide me with a simple client server model using UDP protocol in symbian? Also another doubt is will the program work on the emulator?

    Thank you and regards,
    JP

    Quote Originally Posted by amitkankani View Post
    i guess you will need to develop this web service yourself.

    as far as connection goes:
    1. you could use http over tcp - http engines are available, so you only need to worry on the data part.

    2. Sockets and tcp is another option.

    3. sockets with UDP is another, here you sould be ready for packet loss...

    also p2p stuff will also work via internet? in that case, i prefer it to be socket and tcp.
    Last edited by dodil; 2008-10-04 at 17:59.

  5. #5
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Communication - TCP UDP

    Also another doubt is will the program work on the emulator?
    it should, all internet based programs work on emulator... unless you are using some sms/call related apis
    Amit Kankani
    Nokia Developer Champion

  6. #6
    Registered User
    Join Date
    Oct 2008
    Posts
    5

    Re: Communication - TCP UDP

    Can someone provide me with a simple client server model using UDP protocol in symbian?

    Thanks in advance for your help.

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

    Re: Communication - TCP UDP

    I have no complete code which would fit here, but the tasks are pretty simple:

    Server
    -RSocketServ Connect
    -RConnection Open,Start
    -RSocket Open(server,afinet,datagram,udp,connection)
    -RSocket Bind
    -RSocket RecvFrom

    Client
    -RSocketServ Connect
    -RConnection Open,Start
    -RSocket Open(server,afinet,datagram,udp,connection)
    -RSocket SendTo

    I have not tried without RConnection, the client should probably work that way too.

  8. #8
    Registered User
    Join Date
    Oct 2008
    Posts
    5

    Re: Communication - TCP UDP

    Still stuck..

    Can you please post some basic example ? How P2P can be implemented.

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

    Re: Communication - TCP UDP

    What have you tried so far? Where does it fail? How have you tested (UDP - or at least some aspects of it like broadcasting - might not work in the emulator)?

  10. #10
    Registered User
    Join Date
    Oct 2008
    Posts
    5

    Re: Communication - TCP UDP

    I have converted all IPAddress types to TInetAddress types. Is the TInetAddress type equivalent to the IPAddress type of SDL_net.

    Thx

  11. #11
    Registered User
    Join Date
    Dec 2005
    Posts
    1,236

    Re: Communication - TCP UDP

    Hi,

    A wiki article on networking a good starting point if you have not referred it http://wiki.forum.nokia.com/index.ph...he_sockets_API
    Regards,
    Sriky

Similar Threads

  1. Q: Is it permission to use UDP communication in EXE program?
    By akom in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2004-03-23, 22:29
  2. Datagram Connection (TCP and UDP) in Nokia 6600
    By hbfornies in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2003-11-11, 22:29
  3. UDP or TCP on 7650
    By wecommEPOC in forum Mobile Java General
    Replies: 1
    Last Post: 2002-11-06, 12:43
  4. TCP or UDP socket support in ANY phone??
    By magnused in forum Mobile Java General
    Replies: 0
    Last Post: 2002-10-21, 08:42

Posting Permissions

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