Revision b69684c3 src/session.py
b/src/session.py | ||
---|---|---|
50 | 50 |
# ... |
51 | 51 |
self._q.add(hello) |
52 | 52 |
|
53 |
@override |
|
54 | 53 |
def _close(self): |
55 | 54 |
raise NotImplementedError |
56 | 55 |
|
57 |
@override |
|
58 | 56 |
def connect(self): |
59 | 57 |
raise NotImplementedError |
60 |
|
|
61 | 58 |
|
62 | 59 |
def send(self, message): |
63 | 60 |
if self.ready: |
... | ... | |
67 | 64 |
|
68 | 65 |
### Thread methods |
69 | 66 |
|
70 |
@override |
|
71 | 67 |
def run(self): |
72 | 68 |
raise NotImplementedError |
73 | 69 |
|
... | ... | |
93 | 89 |
def get_capabilities(self, whose): |
94 | 90 |
return self._capabilities[whose] |
95 | 91 |
|
96 |
@property |
|
97 |
def ready(self): self._connected and self._initialised |
|
92 |
ready = property(lambda self: self._connected and self._initialised) |
|
98 | 93 |
|
99 |
@property |
|
100 |
def id(self): self._id |
|
94 |
id = property(lambda self: self._id) |
|
101 | 95 |
|
102 |
@property |
|
103 |
def client_capabilities(self): |
|
104 |
return self._capabilities[CLIENT] |
|
96 |
client_capabilities = property(lambda self: self._capabilities[CLIENT]) |
|
105 | 97 |
|
106 |
@property |
|
107 |
def server_capabilities(self): |
|
108 |
return self._capabilities[SERVER] |
|
98 |
server_capabilities = property(lambda self: self._capabilities[SERVER]) |
Also available in: Unified diff