Advertisement
nintyning

client_python_RPi

Apr 29th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. import socket
  2. import time
  3.  
  4. network = '10.10.10.179'
  5. port = 8080
  6.  
  7.  
  8. clisocket = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
  9. print(network)
  10. print(port)
  11. clisocket.connect((network,port))
  12. print("connected...")
  13. time.sleep(1)
  14.  
  15.  
  16.  
  17. while True:
  18.     input_value = input("input data : ")
  19.     data_bytes = input_value.encode('utf-8')
  20.     clisocket.sendall(data_bytes)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement