Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
platform
/
tx1_box_serv
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 551304e9
authored
Dec 27, 2018
by
熊付
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
【websocket添加监听握手延时】
1 parent
50bccd26
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
code/tx1_box_serv/apps/api/ws_serv.py
code/tx1_box_serv/apps/api/ws_serv.py
View file @
551304e
...
...
@@ -2,7 +2,7 @@
from
socket
import
*
import
json
,
time
,
threading
import
apps.
gbvar.ws_serv_global
as
sv_global
import
gbvar.ws_serv_global
as
sv_global
config
=
{
'LISTEN_CLIENT'
:
50
,
'KEY'
:
'391f10fadc339e9ec5fa15af60030ac1'
,
...
...
@@ -90,6 +90,7 @@ class Server ():
self
.
clients
[
address
]
=
tcpClientSock
self
.
thrs
[
address
]
=
threading
.
Thread
(
target
=
self
.
readMsg
,
args
=
[
address
]
)
self
.
thrs
[
address
]
.
start
()
time
.
sleep
(
0.001
)
# print(self.clients)
def
readMsg
(
self
,
address
):
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment