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
5b8b8d81
Commit
5b8b8d81
authored
Nov 08, 2012
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some typo bugfixes
parent
ca2b552a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
websocket.py
websocket.py
+5
-5
No files found.
websocket.py
View file @
5b8b8d81
...
@@ -32,8 +32,8 @@ class websocket(object):
...
@@ -32,8 +32,8 @@ class websocket(object):
>>> sock = websocket()
>>> sock = websocket()
>>> sock.connect(('kompiler.org', 80))
>>> sock.connect(('kompiler.org', 80))
"""
"""
def
__init__
(
self
,
protocols
=
[],
extensions
=
[],
family
=
socket
.
AF_INET
,
def
__init__
(
self
,
protocols
=
[],
extensions
=
[],
s
family
=
socket
.
AF_INET
,
proto
=
0
):
s
proto
=
0
):
"""
"""
Create a regular TCP socket of family `family` and protocol
Create a regular TCP socket of family `family` and protocol
...
@@ -41,11 +41,11 @@ class websocket(object):
...
@@ -41,11 +41,11 @@ class websocket(object):
`extensions` is a list of supported extensions.
`extensions` is a list of supported extensions.
`
family` and `
proto` are used for the regular socket constructor.
`
sfamily` and `s
proto` are used for the regular socket constructor.
"""
"""
self
.
protocols
=
protocols
self
.
protocols
=
protocols
self
.
extensions
=
extensions
self
.
extensions
=
extensions
self
.
sock
=
socket
.
socket
(
family
,
socket
.
SOCK_STREAM
,
proto
)
self
.
sock
=
socket
.
socket
(
sfamily
,
socket
.
SOCK_STREAM
,
s
proto
)
def
bind
(
self
,
address
):
def
bind
(
self
,
address
):
self
.
sock
.
bind
(
address
)
self
.
sock
.
bind
(
address
)
...
@@ -91,7 +91,7 @@ class websocket(object):
...
@@ -91,7 +91,7 @@ class websocket(object):
return
self
.
sock
.
getpeername
()
return
self
.
sock
.
getpeername
()
def
getsockname
(
self
):
def
getsockname
(
self
):
return
self
.
sock
.
get
peer
name
()
return
self
.
sock
.
get
sock
name
()
def
setsockopt
(
self
,
level
,
optname
,
value
):
def
setsockopt
(
self
,
level
,
optname
,
value
):
self
.
sock
.
setsockopt
(
level
,
optname
,
value
)
self
.
sock
.
setsockopt
(
level
,
optname
,
value
)
...
...
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