Commit 5b8b8d81 authored by Taddeüs Kroes's avatar Taddeüs Kroes

Some typo bugfixes

parent ca2b552a
...@@ -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=[], sfamily=socket.AF_INET,
proto=0): sproto=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 `sproto` 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, sproto)
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.getpeername() return self.sock.getsockname()
def setsockopt(self, level, optname, value): def setsockopt(self, level, optname, value):
self.sock.setsockopt(level, optname, value) self.sock.setsockopt(level, optname, value)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment