Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

basic socket programming question

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
i am writing a network mon app in python. I am new to socket programming and would like to know first how to just make a basic connection on a given port. for instance, i want to be able to open a connection to port 80 then close it.

can someone point me in the right direction or give up some sample code? thanks in advance.
 
Here's an example from the Python documentation.

It's a server and a client which dialog through port 50007 using sockets.
You can easily change the port number of course.



This is basic socket programming, but you can be relieved of some tedious tasks by using more advanced servers, such as : socketserver, BaseHTTPServer, SimpleHTTPServer, medusa, etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top