Handle pings
This commit is contained in:
parent
563ad1503a
commit
0d14510e82
|
@ -119,6 +119,7 @@ class Connection(object):
|
|||
if protocol.Add.isClassOf(v): return self._lookup(v[0])._add(v[1])
|
||||
if protocol.Del.isClassOf(v): return self._lookup(v[0])._del(v[1])
|
||||
if protocol.Msg.isClassOf(v): return self._lookup(v[0])._msg(v[1])
|
||||
if protocol.Ping.isClassOf(v): self._send(self._encode(protocol.Pong()))
|
||||
|
||||
def _send(self, bs):
|
||||
raise Exception('subclassresponsibility')
|
||||
|
|
|
@ -11,6 +11,10 @@ Add = Record.makeConstructor('Add', 'endpointName captures')
|
|||
Del = Record.makeConstructor('Del', 'endpointName captures')
|
||||
Msg = Record.makeConstructor('Msg', 'endpointName captures')
|
||||
|
||||
## Bidirectional
|
||||
Ping = Record.makeConstructor('Ping', '')
|
||||
Pong = Record.makeConstructor('Pong', '')
|
||||
|
||||
## Standard Syndicate constructors
|
||||
Observe = Record.makeConstructor('observe', 'specification')
|
||||
Capture = Record.makeConstructor('capture', 'specification')
|
||||
|
|
Loading…
Reference in New Issue