Last active
September 7, 2019 02:46
-
-
Save Adarshreddyash/b27c3de3c04c937c37e35aecbb112c02 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 | |
serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
serversocket.bind(('localhost', 5000)) | |
serversocket.listen(5) | |
while True: | |
connection, address = serversocket.accept() | |
buffer = connection.recv(68) | |
if len(buffer) > 0: | |
print(buffer) | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment