×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Aug 2005
    Posts
    86

    Problem Client-server Programming

    hi,
    In my project,
    I created one client porgram in j2me,which will get the request from the browser and send that request to the proxy server and get the response from the proxyserver and send it back to the browser.
    Browser<->Myapplication<->proxyserver.

    my program is working fine in emulator.after installing my application in the mobile(i tested in Nokia6630 and also N70)the request from the browser in the mobile is not going to the proxyserver.
    In mobile first, i run the application and then i opened the browser.by that time the connection between the browser and my application is getting established and nothing happens then.
    If I close the browser then the request is going to proxyserver.
    the following is the code i am using to send the request and getting back the request.

    String str = "socket://xxx.xxx.xxx.x:9393";where xxx.xxx.xxx.x is the ip address of the machine where my server is running.
    s = (SocketConnection)Connector.open(str,Connector.READ_WRITE);
    /*OutStream to write the request to the proxy server*/
    out = s.openOutputStream();
    outw = new PrintStream(out);
    outw.print(requestHeader);//request from the browser
    outw.print("\r\n\r\n");
    outw.print("\r\n\r\n");
    outw.flush();
    /*Inputstream to read the response from the proxy server*/
    in = s.openInputStream();
    /* writing the response in the browser*/
    while((len = in.read(buffer))!= -1) {
    os.write(buffer, 0, len);
    }

    Can anyone help me to make this working in mobile?i am struggling for so long time to do.
    thanks a lot.

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Problem Client-server Programming

    My guess here is that the simultaneous connections (browser and midlet) cause the problems.

    Hartti

Similar Threads

  1. client server connection problem
    By jeff4yee in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2006-09-28, 11:11
  2. Bluetooth client problem on games!
    By wmchan78 in forum Mobile Java Networking & Messaging & Security
    Replies: 6
    Last Post: 2006-03-22, 06:15
  3. server client architecture
    By Onib in forum Symbian
    Replies: 4
    Last Post: 2005-05-25, 07:50
  4. Replies: 0
    Last Post: 2003-10-28, 12:50
  5. Problem with server example...
    By rusyaev in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2003-03-21, 13:44

Posting Permissions

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