socket only connection

C
import socket # client
a = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
host = 'host ip '
port = 'host port'
a.connect((host,port))import socket #server
a = socket.socket(socket.AF_INET,socket.SOCK_STREAM)

host = 'host ip '

port = 'port'

a.bind((host,port))

a.listen(5)#5 is the no. of client at a time 

socketclient,address  = a.accept()

print('got a connetion from',address)
Source

Also in C: