0

hi, I don't use python very often, and I don't have a lot of experience with network programming either. A friend of mine came up with a problem, and I was wondering if anyone could help out:

"I need to connect to another computer with a UDP socket and TCP/IP socket. Although I know how to do this, I need to know how to broadcast a request to connect to a hosting socket (using the UDP socket), have another computer be able to search for any requests to connect, and then establish a one-on-one connection between the computers (using the TCP/IP socket); all of this done over a local network. In a nutshell, connecting two computers over a local network."

Any help is much appreciated, thanks!

2
Contributors
1
Reply
3
Views
8 Years
Discussion Span
Last Post by tzushky
0

You need a basic client and server ...YOu can get short code anywhere...

Here is a great article which explains all the basics and also gives you the shortest possible code for both a client and a server, even a server which can accept several clients using threads... Run server first and then client and you can see anything and then change the functions to send different data (it's only an 'echo' example: server resends the data received to the client):

http://www.devshed.com/c/a/Python/Sockets-in-Python-Into-the-World-of-Python-Network-Programming/

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.