Fix problems with TwoPartyServer
Fixes #61 It turns out I messed up the Server initialization code for the case where a string is passed in as the address. The tests only cover the cases where a raw socket is passed in. This will be rectified in a following commit.
This commit is contained in:
@@ -130,15 +130,10 @@ given address/port ADDRESS may be '*' to bind to all local addresses.\
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def restore(ref):
|
||||
assert ref.as_text() == 'calculator'
|
||||
return CalculatorImpl()
|
||||
|
||||
|
||||
def main():
|
||||
address = parse_args().address
|
||||
|
||||
server = capnp.TwoPartyServer(address, restore)
|
||||
server = capnp.TwoPartyServer(address, bootstrap=CalculatorImpl())
|
||||
server.run_forever()
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user