Created
July 20, 2012 00:37
-
-
Save donalmacc/3147929 to your computer and use it in GitHub Desktop.
Sender
This file contains hidden or 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
# Sender client | |
import socket | |
HOST = '127.0.0.1' # The remote host | |
PORT = 1756 # The same port as used by the server | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s.connect((HOST, PORT)) | |
print"Please enter your message:" | |
msg = raw_input() | |
s.sendall(msg) | |
s.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment