Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 16th, 2004, 05:32 PM
bannedalot bannedalot is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 25 bannedalot User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
search network

if there are 10 versions of my program each on different pcs in an intranet, how could i get one of the programs to search for the other computers? all the pcs are windows systems. assuming we don't know how the pc's are connected. is there any thing in windows to connect to which searches computers?

i really dont understand how this could be done?

cus there are soooo many possible ip addresses that a computer could have - could python change the ip of a computer, then the computer that's doing the searching can search for premade values?

Ta.

Reply With Quote
  #2  
Old November 16th, 2004, 07:33 PM
DevCoach DevCoach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Feb 2004
Location: London, England
Posts: 1,254 DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 8 h 9 m
Reputation Power: 265
Changing the IP address is a big no-no. It would break every other application on the PC that used the network, and cause no end of problems.

There are a few solutions that come to mind.

1) The first is to have one system that acts as a name server - the other PCs have to be given the address of this system, and they register with it when they start up. They can then query it to find out where all the others are. This is essentially how systems like CORBA work, and even the internet itself. If you use CORBA for communicating between hosts then you should get a name server as part of the CORBA framework. I have used omniORB which has very good Python support.

2) The next solution is to send broadcast or multicast packets out asking for the other programs to respond. This requires knowledge of low level socket programming. You should get an assigned port number from the IANA so that you know which port to listen on for your other applications' broadcasts. You will also need to define a protocol for your applications to talk to each other.

3) Windows has an API for finding the other Windows systems on the network - this is what is used when you browse 'Network Neighbourhood'. You could use the Win32All extensions to get a list of available systems on the network and interrogate each one for your application. This has two disadvantages: (a) it is SLOOOOOW. (b) If a PC does not have network sharing enabled it may not appear on the network list.

I have used both (1) and (2) in the past, and on balance I would recommend going with (1) if you can.

Dave - The Developers' Coach

Reply With Quote
  #3  
Old November 17th, 2004, 04:28 AM
bannedalot bannedalot is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 25 bannedalot User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thanks alot devcoach - and everyone else that answers to my posts, the python forum seems so much more helpfull than any of the others here.

Reply With Quote
  #4  
Old November 17th, 2004, 10:03 AM
bannedalot bannedalot is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 25 bannedalot User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
so how could i go about creating my own name server then? I found a post on devshed but it was going on about buying domain names. all i need is the facility for my computers to be able to recognise each other.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > search network


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT