Created
June 17, 2015 05:28
-
-
Save evernick/04c3aad6c07f3ac5add4 to your computer and use it in GitHub Desktop.
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
# -*- coding: utf-8 -*- | |
from socket import * | |
if __name__ == "__main__": | |
s = socket(AF_INET, SOCK_STREAM) | |
s.bind(("127.0.0.1", 9000)) | |
s.listen(1) | |
conn, addr = s.accept() | |
recv_data = conn.recv(1024) | |
print 'Received Data : ' + recv_data | |
s.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment