Commit a1721eeb authored by Taddeüs Kroes's avatar Taddeüs Kroes

Changed receive() to recv() on Connection class to generalize the API

parent ba21de4a
...@@ -39,7 +39,7 @@ class Connection(object): ...@@ -39,7 +39,7 @@ class Connection(object):
else: else:
self.sock.send(*message.fragment(fragment_size, mask=mask)) self.sock.send(*message.fragment(fragment_size, mask=mask))
def receive(self): def recv(self):
""" """
Receive a message. A message may consist of multiple (ordered) data Receive a message. A message may consist of multiple (ordered) data
frames. A control frame may be delivered at any time, also when frames. A control frame may be delivered at any time, also when
...@@ -103,7 +103,7 @@ class Connection(object): ...@@ -103,7 +103,7 @@ class Connection(object):
""" """
while True: while True:
try: try:
self.onmessage(self.receive()) self.onmessage(self.recv())
except SocketClosed as e: except SocketClosed as e:
self.close(e.code, e.reason) self.close(e.code, e.reason)
break break
......
...@@ -237,7 +237,6 @@ class ClientHandshake(Handshake): ...@@ -237,7 +237,6 @@ class ClientHandshake(Handshake):
self.wsock.protocol = protocol self.wsock.protocol = protocol
def handle_auth(self, headers): def handle_auth(self, headers):
# HTTP authentication is required in the request # HTTP authentication is required in the request
hdr = headers['WWW-Authenticate'] hdr = headers['WWW-Authenticate']
......
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