socket error

Ajay abra9823 at mail.usyd.edu.au
Fri Sep 17 16:49:28 CEST 2004


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.evaluate(persona, policyURL, address, self.username,
MODELDIR,
self.frame)
  File "C:\hons\prototype\um\proxyhandler.py", line 71, in evaluate
    s.connect(address)
  File "<string>", line 1, in connect
  File "c:\Python23\lib\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.



More information about the Python-list mailing list