Socket Programming 1.01

Jayanth

Categories:

FACT

This is my THIRD BLOG

MY HANDLES

INSTA
FB
LINKDIN
GITHUB
GMAIL

COMPANIES KNOWN

Mini Militia , Gaming Industry , Telecommunications Companies , IoT Companies , Google ,Facebook etc ...

QUOTE

"I can't do everything. But I can do this ." - SpiderMan aka PeterParker

In the 10.5th class (it's halfway through the 10th grade), I had a doubt about how the Mini Militia game could support multiplayer options, where more than two people can communicate and play simultaneously. At that time, I decided to do some Google searches. The search results pointed me to 'sockets.' I was intrigued but lacked an understanding of what sockets were. Sockets seemed related to Networking Basics, Operating System Knowledge, IP Addresses, and Ports. I felt like I was in the dark. Months later, I gained some basic knowledge about computer networks and fundamental concepts. These topics are vast and can feel overwhelming, akin to knowing just a teaspoon of saltwater from the ocean. Now, I want to write a series of blog posts about socket programming and its basic applicationsl Let's dive into the ocean of this teaspoon-sized topic :)

prequesities :

#Programming Language   |   #ComputerNetwork   |   #Socket Types

Introduction

Posted on September , 2023 in JayanthBlog

Sockets, in the context of computer networks, can be thought of as virtual connectors or communication channels that facilitate communication between different programs or applications running on separate computers. They function much like the plugs and sockets used to connect electronic devices in the real world. Sockets in computer networks serve as connectors that can act both as clients and servers. They are always open and ready to establish connections with other systems while also actively waiting to receive connection requests

We will now delve into the basics of the internet. In computer networking, a port number is a 16-bit unsigned integer, ranging from 0 to 65535. It is used to identify specific processes or services running on a device, typically a computer, within a network. Port numbers play a crucial role in the Transport Layer of the Internet Protocol Suite, specifically in the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). In this blog, I will discuss the applications of TCP. This discussion involves two distinct fields: the server-side and the client-side

Creating a basic chat application between a server and a client using sockets in Python involves setting up a server that listens for incoming connections and a client that connects to the server. Here's using Python's socket module for both the server and client

SERVER.py
  1. import socket
  2. import threading
these modules are used to demonistrate the sockets SETUP IN PORTNUMBER AND IP ADDRESS
  1. HOST = '127.0.0.1' # localhost
  2. PORT = 12345
for demonistration purpose i will use local host and make sure you select unused portnumber CLIENT.py SETUP IN PORTNUMBER AND IP ADDRESS
  1. SERVER_HOST = '127.0.0.1' # localhost
  2. SERVER_PORT = 12345
for demonistration purpose i will use local host and make sure you enter server ip address

if you want know more about the please make sure you check my GITHUB

IT IS NOT ROCKET SCIENCE IT IS SOME DEMO PURPOSE
This is not the only blog related to sockets; it's the beginning of a series of blogs. In this 'Common Sense' section, I will share my opinions on various issues and some interesting topics See you soon follow my social media handles for blog updates   |   BOI BOI