socket error

A

Ajay

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,144
Latest member
KetoBaseReviews
Top