473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

help using sockets, and OOP?

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?
Jul 18 '05 #1
1 1168
Dfenestr8 wrote:
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
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mrpolitics | last post by:
So I'm working with PureIRCD (http://sourceforge.net/projects/pure-ircd) and everything was fine untill yesterday when the server crashed. So I did a cold restart and staretd the server back up...
9
by: AA | last post by:
This is making me crazy!! Please, if some body can help me. I'm testing a ver simple socket client. In my test I just open and close a connection (in a loop) to my local IIS server (port 80)...
10
by: Alejandro Castañaza | last post by:
Hi. I'm writing a program, and I need to send confidential data through the network, so I decided to use encryption, using the System.Security.Cryptography namespace. I'm using the sockets...
3
by: Winston Nimchan | last post by:
Hi: I would like to build a socket server application that is user configurable using XML (app.config) and would like some guidance. I already have a single socket server working but would...
1
by: A Hirsi | last post by:
I have created a vb .net program as a service that is using a simple ftpclient to connect to a remote server and check the status of a file for subsequent downloading if there have been changes to...
1
by: hamil | last post by:
I am having trouble using the TcpListener and TcpClient classes. At the end of this post is server code that runs, and a class whose purpose is described below. I need to know when the client...
6
by: Rik | last post by:
Hello Experts, I have a communication server in VB.NET. It was working fine from last 6 months, but now start giving error message like that. 21-03-2005 07:58:27...
0
by: Eternal Snow | last post by:
Hello. I have some trouble. Please look at this code below written in VB2005 (.net 2 50727). Sub Main() Dim osck As Net.Sockets.Socket Dim datagram() As Byte = {69, 0, 0, 52, 108, 180, 0, 0,...
12
by: manochavishal | last post by:
Hi, I am having strange problem in my Program. I cannot paste the whole program as it is huge so just pasting the lines i think are necessary. I am passing a integer array pointer to a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.