×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    8

    Socket connection problem

    Hi to all, I'm developing an application that mixes Python and Javame.

    I wrote this code
    Code:
    from socket import *
    
    client=socket(AF_INET, SOCK_STREAM)
    client.connect(("127.0.0.1", 9000))
    client.send("")
    The Python script tries to connect to localhost and the Javame program is launched through PushRegistry

    The first time the connection and the "awakening" of the Javame program were successful, but when I rebooted the phone and launched the Python script I got this message:
    Code:
    client.connect(("127.0.0.1", 9000))
    File "<string>" , line 1, in connect error: (61, "Connection refused")
    Obviously I didn't change the code, but now the program don't work, do you know why?

    I really need to solve this problem

    Thanks in advance
    Last edited by Verci; 2011-03-27 at 13:47.

  2. #2
    Registered User
    Join Date
    May 2010
    Posts
    8

    Re: Socket connection problem

    I solved the problem. I needed to start a server on the localhost and then launch the client

Similar Threads

  1. Wifi ad hoc connection(socket connection problem)
    By wlwelf in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2008-12-12, 02:20
  2. Socket connection problem....
    By sharan182 in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2008-03-29, 15:30

Posting Permissions

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