Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

socket.accept python

socket_server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket_server.bind(('localhost', 5555))
socket_server.listen(5)
            
while True:
	conn, addr = socket_server.accept()
	print('Connected by', addr)
	with conn:
		while True:
			data = conn.recv(1024)
				if not data: break
Comment

PREVIOUS NEXT
Code Example
Python :: how to do the sum of list in python 
Python :: sum of diagonal numpy 
Python :: arithmetic operators in python 
Python :: Fun & learn with python turtle 
Python :: multiplication in python 
Python :: how to find a key in a dictionary python 
Python :: tri python 
Python :: python tuples 
Python :: how to save python variables locally 
Python :: python run uvicorn 
Python :: python elif syntax 
Python :: django values_list 
Python :: iterating over lines in a file 
Python :: how to use iteration in python 
Python :: using slug or .. instead of pk in django 
Python :: print numbers from 1 to 100 in python 
Python :: python write error to file 
Python :: python sort list case insensitive 
Python :: python port forwarding 
Python :: == in python 
Python :: socket for api in django 
Python :: import messages 
Python :: skeppy python 
Python :: Python Switch case statement Using classes 
Python :: how long is the pyautogui script 
Python :: get linkinstance revit api 
Python :: python while loop and recursion 
Python :: python - retrieve unconnected node pairs 
Python :: rabin karp algorithm 
Shell :: remove nginx from ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =