×

Discussion Board

Results 1 to 5 of 5

Thread: Network

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    9

    Network

    Hi All

    I cant make a SocketConnection in my program, i dont understand why because in the API it's not a problem...
    I try to import this:

    import javax.microedition.io.SocketConnection;

    And do this:

    SocketConnection se;
    try {
    sc = (SocketConnection) Connector.open("socket://localhost:5000");

    si.setText("Connected to server");

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    import javax.microedition.io.SocketConnection
    I don't remember seeing this interface around...
    Most J2ME implementations today don't support sockets. Http is the only protocol that's supported across all platforms.

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

    Java API

    That's not it!
    If you check out the API for Wireless dev. from sun, you will see that it is possible to create a SocketConnection.

    Thanks any way :O)

  4. #4
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395
    it may or may not be possible. A socket connection will work from the Sun emulator but, as shmoove says, not on many phones. The Connection framework can support many different protocols, but HTTP is the only one that is required by the specification.

    Graham.

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

    HTTP

    Thank's for the help.
    My conclusion is too to create a HTTP connection.
    Thanks again!

Posting Permissions

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