Discussion Board

Results 1 to 3 of 3

Thread: socket

  1. #1
    Registered User
    Join Date
    Feb 2010


    i have java application that modify image and draw points in certain coordinate but it need to read this input coordinate from a mobile application
    i have made a server/client socket
    my problem is that when the server application read the input coordinate from mobile it do not continue the rest of the code and it continue listening to data from mobile
    how can i make the application when it gets the data to continue the rest of the code

    with best regard

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2007

    Re: socket

    Hello souhir,

    if I understand correctly, you are using read() for InputStream in which case the method blocks until input data is available, the end of the stream is detected, or an exception is thrown. The solution would be to place the code in to thread for separate execution, please view this by Sun on threads: http://developers.sun.com/mobility/m...es/threading2/

    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2009
    Noida, India

    Re: socket

    Hi Souhir,

    Try using MVC design pattern and a Network thread to update your data model i.e. a vector or array of coordinates. Put a data change listener on your data model that updates - repaints the UI - drawing all coordinates on the image. In the network thread try reading in chunks and fill-up your data model.


Similar Threads

  1. continuous read and write from tcp/ip socket
    By rahul.shalik.makode in forum Symbian
    Replies: 0
    Last Post: 2009-08-01, 08:17
  2. SOCKET PROGRAMMING: Client can not connect to server...
    By simbiyan in forum Symbian Networking & Messaging (Closed)
    Replies: 5
    Last Post: 2007-04-22, 20:00
  3. problem in persistant socket connection
    By poms4symbian in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2006-01-03, 13:23
  4. Socket problem
    By defragger in forum Symbian
    Replies: 0
    Last Post: 2005-08-25, 08:16

Posting Permissions

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