×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    6

    Sockets in MIDP 1.0

    Hi

    Im developing a J2ME Chat client and im using MIDP 1.0. I know that Socket connections are not implemented in MIDP 1.0 specifications. Of course if somebody try to compile a code with Socket object, it doesnt compile.

    Well for that reason im trying to use a Connector(url) and a StreamConnection. Something like this:

    try {

    String url = "socket://" + "200.74.214.103" + ":" + "6660";
    StreamConnection s = (StreamConnection)

    Connector.open(url);

    Client( s); //manage messages in s

    }
    catch (IOException ioe) {

    exception(ioe);
    }

    For me is another way to connect a chat server. I test the program in a different emulators (J2ME wireless toolkit, nokia emulator 60 series, palm emulator, motorola emulator) and it works. But if i run the program in a handset for example Nokia 3650 for GPRS, GTRAN phone, it doesnt work. Now i dont now if the problem is with the code or the implementation of gateways (celular network).

    Somebody can tell me if there is something wrong? I can use that in MIDP 1.0? Is there another way to do that, some suggestions?

    Thanks a lot.

  2. #2
    Registered User
    Join Date
    Aug 2003
    Location
    London, UK
    Posts
    8
    Yeap, that is fine, and works fine in the Nokia 7650 (I have a VNC client that uses it) What is the error message throw?

  3. #3
    Registered User
    Join Date
    Jul 2003
    Posts
    6

    Sockets in MIDP 1.0

    thanks fow answering

    the message is something like this:

    the port or url cannot be contacted, i dont remeber exactly, also the message is too fast in the phone.

    i contacted the phone manufacturer and they told me that socket in not implemented because Socket is not defined in MIDP 1.0.

    I think there is a confuse, but if you say that it works, i dont know what to do. Could you tell me if there is a way to test? i made another test using a telnet for handsets and it didnt work either.

    Thanks again

  4. #4
    Registered User
    Join Date
    Aug 2003
    Location
    London, UK
    Posts
    8
    Sockets defently in the 7650, they are optional for MIDP 1.0, and will throw an error like: The Requested Protocal Does Not Exist.
    Put a Alert in the catch statment so you have time to read the exception.

  5. #5
    Registered User
    Join Date
    Jul 2003
    Posts
    6

    'Sockets in MIDP 1.0'

    exactly its the same error

    whats happening?

  6. #6
    Registered User
    Join Date
    Aug 2003
    Location
    London, UK
    Posts
    8
    I've noticed you are using a Nokia 3650, I read that as a Nokia 7650. I don't know if the 3650 supports sockets, prob. not.

Posting Permissions

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