a lot of work on sockets, and added chat module

This commit is contained in:
Kevin Froman 2018-09-19 23:35:26 -05:00
parent 1d7fd65f38
commit f8b10cfe12
6 changed files with 83 additions and 28 deletions

View file

@ -85,8 +85,12 @@ def on_processBlocks(api):
port = api.data['port']
except KeyError:
raise ValueError("Missing port for new socket")
try:
reason = api.data['reason']
except KeyError:
raise ValueError("Missing socket reason")
socketInfo = json.dumps({'peer': api.data['signer'], 'address': address, 'port': port, create = False})
socketInfo = json.dumps({'peer': api.data['signer'], 'address': address, 'port': port, 'create' = False, 'reason': reason})
api.get_core().daemonQueueAdd('startSocket', socketInfo)
def on_init(api, data = None):