mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-05-01 05:39:50 +08:00
测试demo
This commit is contained in:
parent
67e8e18237
commit
13708434c9
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
*.user*
|
||||
.qmake.stash
|
||||
__pycache__
|
||||
|
22
Host/mainwindow.py
Normal file
22
Host/mainwindow.py
Normal file
@ -0,0 +1,22 @@
|
||||
import time
|
||||
import socket
|
||||
import traceback
|
||||
while True:
|
||||
try:
|
||||
s = socket.socket()
|
||||
s.connect(("127.0.0.1", 8080))
|
||||
info = "Apple".encode("utf-8")
|
||||
len = s.send(info)
|
||||
ret = s.recv(1024)
|
||||
if info == ret:
|
||||
print("success")
|
||||
break
|
||||
except:
|
||||
traceback.print_exc()
|
||||
time.sleep(0.1)
|
||||
exit()
|
||||
while True:
|
||||
|
||||
if not ret:
|
||||
s.close()
|
||||
|
Loading…
x
Reference in New Issue
Block a user