example tcp socket client
This commit is contained in:
commit
c94b814cdf
14
tcp_socket_client.py
Executable file
14
tcp_socket_client.py
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/python2
|
||||
|
||||
import socket
|
||||
import time
|
||||
|
||||
target="192.168.178.21"
|
||||
port=5005
|
||||
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.connect((target,port))
|
||||
|
||||
while 1:
|
||||
s.send("test")
|
||||
time.sleep(1)
|
Loading…
Reference in New Issue
Block a user