Socket programming is a way of connecting two nodes on a network to communicate with each other. One socket(node) listens on a particular port at an IP, while the other socket reaches out to the other to form a connection. The server forms the listener socket while the client reaches out to the server.
Socket Programming Digram :
1:- Server
# first of all import the socket libraryimportsocket# next create a socket objectsocket_obj=socket.socket()# Next bind to the portsocket_obj.bind(('localhost',8002))# put the socket into listening modesocket_obj.listen(4)# Establish connection with client.client_obj,address=socket_obj.accept()# receive data from clientrecv_msg=client_obj.recv(1024)# Decode datarecv_msg.decode('utf-8')# Print Dataprint(recv_msg)# Close the connection with the clientsocket_obj.close()
1:- Client
# import the socket libraryimportsocket# Create a socket objectsocket_obj=socket.socket()# connect to the server using host and portsocket_obj.connect(('localhost',8002))# input datamsg=str(input("Entter your message : "))# encode and send the data from input datasocket_obj.send(msg.encode('utf-8'))
Here is the final result :
Owner
Janak raikhola
Actions do not cling to me because I am not attached to their results. Those who understand this and practise it live in freedom.
This Tool can help enginners and biggener in network, the tool help you to find of any ip with subnet mask that can calucate them and show you ( Availble IP's , Subnet Mask, Network-ID, Broadcast-ID
AutoDD = Automatically does the "due diligence" for you. If you want to know what stocks people are talking about on reddit, this little program might help you.
ARTIF is a new advanced real time threat intelligence framework built that adds another abstraction layer on the top of MISP to identify threats and malicious web traffic on the basis of IP reputatio
wireguard-config-benchmark is a python script that benchmarks the download speeds for the connections defined in one or more wireguard config files. If multiple configs are benchmarked it will output
• Socket Chat Room was a little project for socket study. It works with a server handling the incoming connections from the clients. Clients send encoded messages while waiting for others clients mes