Answers for "python server and client example"

1

server on python

import http.server
import socketserver

PORT = 8000

Handler = http.server.SimpleHTTPRequestHandler

with socketserver.TCPServer(("", PORT), Handler) as httpd:
    print("serving at port", PORT)
    httpd.serve_forever()
Posted by: Guest on May-18-2021
-1

how to run server client program in python

import socket 

ip = socket.gethostbyname('www.google.com')
print ip
Posted by: Guest on May-29-2021

Code answers related to "python server and client example"

Python Answers by Framework

Browse Popular Code Answers by Language