Skip to content

A python program to create sockets between a server and a client.

Notifications You must be signed in to change notification settings

Allan70/Python-Socket

Repository files navigation

Python-Socket 🕳📦📦📦📦🕳

A python program that uses sockets to interact between a server and a client.

A socket is one endpoint of a two-way communication channel between two networked programs. 

By creating named contact points between which the communication takes place, the socket mechanism offers a form of inter-process communication (IPC).

Typically, client-server programs use sockets. The server establishes a socket, connects it to a network port, and then watches for a client request to connect. After creating a socket, the client tries to connect it to the server socket. Data transfer starts as soon as the link is made.

Types of Sockets

  • Datagram Socket🕳⬅📦📦🕳 This kind of network uses connection less points to send and receive packets. It resembles a mailbox. The letters (data) sent into the box is collected, and delivered to a letterbox (receiving socket).
  • Stream Socket🕳⬅📦📦➡🕳A stream socket is a form of network socket or interprocess communication socket that offers a connection-oriented, sequential, and unique flow of data without record boundaries with well defined procedures for establishing and severing connections as well as for detecting faults. It is comparable to a phone. A conversation (data transfer) occurs after the phones (on opposite ends) establish a connection.

Server and Client functions

image

image

Usage

Clone the repo

git clone https://github.com/Allan70/Python-Socket

About

A python program to create sockets between a server and a client.

Topics

Resources

Stars

Watchers

Forks

Languages