Skip to content

Commit

Permalink
Add a tcp client.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrocketfingers committed Aug 7, 2016
1 parent bd2142e commit d901bfa
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions examples/TCP/tcpclient.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from socket import socket, AF_INET, SOCK_STREAM

connection = socket(AF_INET, SOCK_STREAM)

connection.connect(("127.0.0.1", 9001))

while True:
data = raw_input("Input: ")
if(data == "??q"):
exit(0)

connection.send(data)

0 comments on commit d901bfa

Please sign in to comment.