Created
September 28, 2016 21:43
-
-
Save ghazanhaider/5f1608d1626e04435b4b22005e86d7d3 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 | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s.bind(('',8011)) | |
s.listen(5) | |
conn,addr = s.accept() | |
data = conn.recv(1024) | |
conn.send('i am server') | |
conn.close() | |
print "Received: " + data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment