Created
August 5, 2016 12:40
-
-
Save substring/0944d7420e6010608f2a99320af3b0d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import socket module | |
import socket | |
# Create a socket object | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
# Define the port on which you want to connect | |
port = 55355 | |
# connect to the server on local computer | |
s.connect(('127.0.0.1', port)) | |
# receive data from the server | |
print s.send("QUIT") | |
# close the connection | |
s.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment