a python client, too. why not?
This commit is contained in:
parent
277857fe4b
commit
cd8951df52
11
ruby-sockets/ping-pong-client.py
Normal file
11
ruby-sockets/ping-pong-client.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import socket
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
|
||||||
|
|
||||||
|
while True:
|
||||||
|
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
|
client.connect(('localhost', 24000))
|
||||||
|
client.send('PING\n')
|
||||||
|
sys.stdout.write('client: RECV {}'.format(client.recv(100)))
|
||||||
|
time.sleep(0.5)
|
Loading…
Reference in New Issue
Block a user