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
6005726c
Commit
6005726c
authored
Nov 07, 2012
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a function comment
parent
e2400036
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
websocket.py
websocket.py
+7
-1
No files found.
websocket.py
View file @
6005726c
...
@@ -43,6 +43,12 @@ class websocket(object):
...
@@ -43,6 +43,12 @@ class websocket(object):
self
.
sock
.
listen
(
backlog
)
self
.
sock
.
listen
(
backlog
)
def
accept
(
self
):
def
accept
(
self
):
"""
Equivalent to socket.accept(), but transforms the socket into a
websocket instance and sends a server handshake (after receiving a
client handshake). Note that the handshake may raise an InvalidRequest
exception.
"""
client
,
address
=
socket
.
socket
.
accept
(
self
)
client
,
address
=
socket
.
socket
.
accept
(
self
)
client
=
websocket
(
client
)
client
=
websocket
(
client
)
client
.
server_handshake
()
client
.
server_handshake
()
...
@@ -50,7 +56,7 @@ class websocket(object):
...
@@ -50,7 +56,7 @@ class websocket(object):
def
connect
(
self
,
address
):
def
connect
(
self
,
address
):
"""
"""
Equivalent to socket.connect(), but sends an
HTTP
handshake request
Equivalent to socket.connect(), but sends an
client
handshake request
after connecting.
after connecting.
"""
"""
self
.
sock
.
sonnect
(
address
)
self
.
sock
.
sonnect
(
address
)
...
...
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