2006-01-24

Python | Socket Starter

I dont know why, but almost every programmer who learns a new language want's to program sockets right away. If you are one of these species, and you've just learnt python, here's how it can be done. Very simple really.

import sockets
session = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
session.connect((ipaddress, port))

thats it !

Of course you will need to understand more than that. So here's a URL for you.
http://heather.cs.ucdavis.edu/~matloff/Python/PyNet.pdf

0 Comments:

Post a Comment

<< Home