| Start |
|---|
| Creating a Simple Http Server To share files or to host simple websites(http and javascript) in your local network, you can use Python's builtin SimpleHTTPServer module. Python should be in your Path variable. Go to the folder where your files are and type: For For If port number is not given Serving HTTP on 0.0.0.0 port 8000 ... You can access to your files through any device connected to the local network by typing
To finish the module simply press |
| The simplest Python socket client-server example Server side: Client Side: First run the SocketServer.py, and make sure the server is ready to listen/receive sth Then the client send info to the server; After the server received sth, it terminates |
| Creating a TCP server You can create a TCP server using the Server side Client side
|
| Creating a UDP Server A UDP server is easily created using the a simple time server: Testing: |
| Start Simple HttpServer in a thread and open the browser Useful if your program is outputting web pages along the way. Remarks(Very) basic Python client socket example (opens new window) |
Read Article
https://develop.horje.com/learn/1434/reference