Codementor Events

Python for Beginners: Making Your First Socket Program (Client & Server Communication)

Published Jan 13, 2020
Python for Beginners: Making Your First Socket Program (Client & Server Communication)

How to Program in Sockets as a Newbie?

Sockets in Python have always been something I see online and thing "Why is this complex"? "Shouldn't there be a simple way to get started with sockets"? So I decided to make a tutorial myself: However, just like everything in coding, there can be varying levels of compelxity and different implementations for the same tech. Today we are going to look at one simple example for beginners that can help you dive into the vast world of sockets and Python as a whole.

👨‍💻 Download Source Code 😃

Checkout the video:

video-thumb

This program works on a basic system of one client file and one server file.

The client requests a specific text file from the server and then proceeds to download that into a directory on the client's drive. This all happens over a preditirmined port number which is hard coded into server.py and client.py, only when this port number matches are the two of them able to connect and successfully send the file.

This is just the beginning of what you can do with sockets and the possibilites are endless! From online multiplayer gaming to web server hosting, sockets are truly of the most powerful tools you can learn in coding!

See the source code for a simple example of this on my website!

👨•💻 Download Source Code Here

Discover and read more posts from Blade Nelson
get started
post comments5Replies
Abba Haruna
5 years ago

Wow it Awesome!

Blade Nelson
5 years ago

Thank you, Abba! :)

Steve Yack
5 years ago

How do I download the code??

Blade Nelson
5 years ago

Hi Steve, please see my website for more info!

http://aelo.io/new-user2.html

Abba Haruna
5 years ago

This site is Google Form if possible you need to add some futures

Show more replies