×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    1

    how to use udp, for sending data server to client

    Hi,

    I try to make an application that communicate server by udp. i easly send data from client(j2me device) to server. but there is problem when i try to send data from server to client.

    i make server pc as both server and client, and phone become also both server and same time client.
    when i send a data from phone to server, i use phone's client side and send data to server pc's server side. and when i send data from server to phone.

    my code is working good in emulators. but, in real device, it dont work.
    where is problem, do you think?

    thanks

  2. #2
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,699

    Re: how to use udp, for sending data server to client

    hi,

    please specify device if you have issues with real device,


    have you followed example implementations?
    e.g.:
    http://developers.sun.com/techtopics.../midp2network/
    (shipped with Sun WTK)
    http://www.java-samples.com/j2me/udp...le-program.htm

    also search Tech Library,
    e.g.:
    Using receiving and sending threads on a single UDP connection block each other
    KIJ0000332
    Overview
    When using two threads on a single UDP connection, receiving and sending block each other.
    Reported against
    Series 40 1st Edition, Series 40 2nd Edition, some S40 3rd Edition devices
    All Series 40 1st Edition and Series 40 2nd Edition devices, Nokia 6270, Nokia 6280 (only sw version 3.xx), Nokia 7370, Nokia 6111
    Date identified
    April 21, 2006
    Symptoms
    -
    Detailed description
    When using two threads on a single UDP connection, receiving and sending block each other. If an application sets up the receiving thread before sending the first packet, then it will become deadlocked. Also, while it is waiting for a response from the server, it can't retry sending.
    How to reproduce


    Solution
    Use an alternative implementation method. If possible, always set up a sending thread first.

    This is fixed in newer Series 40 3rd Edition devices.
    hth,
    regards,
    Peter

Similar Threads

  1. Bluetooth client problem on games!
    By wmchan78 in forum Mobile Java Networking & Messaging & Security
    Replies: 6
    Last Post: 2006-03-22, 06:15
  2. server client architecture
    By Onib in forum Symbian C++
    Replies: 4
    Last Post: 2005-05-25, 07:50
  3. connection problems while using client server MIDlets with Real terminals
    By Rumens in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-03-28, 09:50
  4. Exchanging data between client and server
    By rihoe in forum Symbian C++
    Replies: 1
    Last Post: 2005-01-31, 08:25
  5. HttpConnection : Getting Raw Data, PHP Server, and Wap Gateway
    By Lapaz in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2003-12-07, 00:55

Posting Permissions

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