Skip to content

Instantly share code, notes, and snippets.

@philcrump
Created March 17, 2017 23:55
Show Gist options
  • Save philcrump/68b90d5e40d9ec974e8bf53084542620 to your computer and use it in GitHub Desktop.
Save philcrump/68b90d5e40d9ec974e8bf53084542620 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()
@oddstr13
Copy link

from __future__ import print_function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment