socket error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ajay

    #1

    socket error

    hi!

    my application is throwing a bad socket error

    raise error(EBADF, 'Bad file descriptor')
    socket.error: (9, 'Bad file descriptor')

    basically i have the following interchange
    application service
    <server1> <client1>
    server1 client socket <-------------- client1
    send address and data
    client1.close
    server2
    client2 socket --------------> server2
    use sent address to connect


    client1 makes a connection to server1 and sends some data. server1 records
    address of client1 and receives the data.
    client1 then closes the connection.
    the code then runs a server2 on the same address as client1.
    and in the same code as server1, i run a client that connects to server2
    this is where i get the error

    Traceback (most recent call last):
    File "app.py", line 146, in doStartServer
    self.handler.ev aluate(persona, policyURL, address, self.username,
    MODELDIR,
    self.frame)
    File "C:\hons\protot ype\um\proxyhan dler.py", line 71, in evaluate
    s.connect(addre ss)
    File "<string>", line 1, in connect
    File "c:\Python23\li b\socket.py", line 143, in _dummy
    raise error(EBADF, 'Bad file descriptor')
    socket.error: (9, 'Bad file descriptor')

    what am i doing wrong?

    thanks




    ----------------------------------------------------------------
    This message was sent using IMP, the Internet Messaging Program.
Working...