import socket s = socket.socket (socket.AF_INET, socket.SOCK_STREAM) s.connect (('localhost', 9999)) s.send (b'0') s.close