Quantcast
Channel: Programming – Xinyustudio
Viewing all articles
Browse latest Browse all 284

Python Socket example: the simplest example

$
0
0

The python socket component is extremely easy to use, and this simplest example demonstrated its typical use. This is simplest, since both the server and client are the local machine:

On the Server Side:

image

On the Client Side:

image

 

 

 

  • 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

That is it.

results

Downloads source files: SocketClient.py | SocketServer.py.


Filed under: Programming Tagged: example, Python, simplest example, Socket

Viewing all articles
Browse latest Browse all 284

Trending Articles