help using sockets, and OOP?

D

Dfenestr8

Hi.

I realise, that there's probably something intrinsic to OOP that I don't
understand here. Or maybe it's something to do with sockets. I'm not sure.

Basically, I'm trying to hack up an IRC bot, that joins two servers at
once. I use two object instancs of the same class, both of which make
connections using the socket module.

Problem is, I can't seem to get both objects to connect to their
constituent servers at the same time. I'm not sure whether it's that both
objects can't instantiate at once, or whether only one can use the socket
module at any one time.

Here's my code:

http://plz.donthack.us/~hairyman/mybot.py

Can anybody see what it is I'm missing?
 
P

Peter Hansen

Dfenestr8 said:
Basically, I'm trying to hack up an IRC bot, that joins two servers at
once. I use two object instancs of the same class, both of which make
connections using the socket module.

Problem is, I can't seem to get both objects to connect to their
constituent servers at the same time. I'm not sure whether it's that both
objects can't instantiate at once, or whether only one can use the socket
module at any one time.

What's the symptom of the problem? I expect your answer
to include a traceback, but perhaps it's something else
like a segmentation fault or something you are observing
yourself... whatever it is, providing a description of
it would be better than just saying you "can't seem to get"
it working...

-Peter
 

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
474,213
Messages
2,571,105
Members
47,698
Latest member
TerraT521

Latest Threads

Top