network programming and sockets his describes the modules used to implement low-level network servers and clients python provides extensive network supportranging from programming directly with sockets to working with high-level application protocols such as http to begina very brief (and admittedly terseintroduction to network programming is presented readers are advised to consult book such as unix network programming,volume networking apissockets and xti by richard stevens (prentice hall isbn -xfor many of the advanced details "internet application programming,describes modules related to application-level protocols network programming basics python' network programming modules primarily support two internet protocols:tcp and udp the tcp protocol is reliable connection-oriented protocol used to establish two-way communications stream between machines udp is lower-level packet-based protocol (connectionlessin which machines send and receive discrete packets of information without formally establishing connection unlike tcpudp communication is unreliable and thus inherently more complicated to manage in applications that require reliable communications consequentlymost internet applications utilize tcp connections both network protocols are handled through programming abstraction known as socket socket is an object similar to file that allows program to accept incoming connectionsmake outgoing connectionsand send and receive data before two machines can communicateboth must create socket object the machine receiving the connection (the servermust bind its socket object to known port number port is -bit number in the range - that' managed by the operating system and used by clients to uniquely identify servers ports - are reserved by the system and used by common network protocols the following table shows the port assignments for couple of common protocols ( more complete list can be found at lib fl ff