repr for websocket frames

This commit is contained in:
Aldo Cortesi 2015-06-05 17:08:22 +12:00
parent 2d9b9be1f4
commit 0269d0fb8b
1 changed files with 3 additions and 0 deletions

View File

@ -332,6 +332,9 @@ class Frame(object):
ret = ret + "\nPayload:\n" + utils.cleanBin(self.payload) ret = ret + "\nPayload:\n" + utils.cleanBin(self.payload)
return ret return ret
def __repr__(self):
return self.header.human_readable()
def to_bytes(self): def to_bytes(self):
""" """
Serialize the frame to wire format. Returns a string. Serialize the frame to wire format. Returns a string.