Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save oddstr13/049ded6ebe0891e232775a3d7745b050 to your computer and use it in GitHub Desktop.
Save oddstr13/049ded6ebe0891e232775a3d7745b050 to your computer and use it in GitHub Desktop.
ukhas.net socket
#!/usr/bin/env python
import socket
TCP_IP = 'ukhas.net'
TCP_PORT = 3010
BUFFER_SIZE = 1024
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))
while 1:
print(s.recv(BUFFER_SIZE))
s.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment