Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wspy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
wspy
Commits
348b79cf
Commit
348b79cf
authored
Dec 21, 2014
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test EchoServer now uses AsyncServer and deflate extensions
parent
d707f2a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
test/server.py
test/server.py
+4
-5
No files found.
test/server.py
View file @
348b79cf
...
@@ -6,19 +6,18 @@ from os.path import abspath, dirname
...
@@ -6,19 +6,18 @@ from os.path import abspath, dirname
basepath
=
abspath
(
dirname
(
abspath
(
__file__
))
+
'/..'
)
basepath
=
abspath
(
dirname
(
abspath
(
__file__
))
+
'/..'
)
sys
.
path
.
insert
(
0
,
basepath
)
sys
.
path
.
insert
(
0
,
basepath
)
from
server
import
Server
from
async
import
AsyncServer
from
deflate_message
import
DeflateMessage
from
deflate_frame
import
DeflateFrame
from
deflate_frame
import
DeflateFrame
class
EchoServer
(
Server
):
class
EchoServer
(
Async
Server
):
def
onmessage
(
self
,
client
,
message
):
def
onmessage
(
self
,
client
,
message
):
Server
.
onmessage
(
self
,
client
,
message
)
client
.
send
(
message
)
client
.
send
(
message
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
EchoServer
((
'localhost'
,
8000
),
EchoServer
((
'localhost'
,
8000
),
#extensions=[DeflateFrame(no_context_takeover=True)],
extensions
=
[
DeflateMessage
(),
DeflateFrame
()],
extensions
=
[
DeflateFrame
()],
#ssl_args=dict(keyfile='cert.pem', certfile='cert.pem'),
#ssl_args=dict(keyfile='cert.pem', certfile='cert.pem'),
loglevel
=
logging
.
DEBUG
).
run
()
loglevel
=
logging
.
DEBUG
).
run
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment