Quantcast
Channel: Go4Expert
Viewing all articles
Browse latest Browse all 1989

Python Server/Client Sockets help

$
0
0
I am trying to learn server/client sockets in python. I can establish the server and client and make the connection. I would like the server to ask the client to input a command. I would like the command to be TIME and I would like the response to display the current time. How do I do that?

Here is my server code:
Code:
#shell_server.py for python3
import socket
import subprocess

s= socket.socket(socket.AF_INET,socket.SOCK_STREAM)
#s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)...
Python Server/Client Sockets help

Viewing all articles
Browse latest Browse all 1989

Trending Articles