Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
a simple tcp client(python code)
#! /usr/bin/python
# a simple tcp client
import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('', 12345))
sock.send(raw_input("Please input : "))
print sock.recv(1024)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment