netsys-lab / scion-path-discovery

The goal of the SCION-Pathdiscovery project is to leverage the path-awareness features of the SCION secure Internet architecture in order to discover a fast and reliable content lookup and delivery.
Apache License 2.0
0 stars 1 forks source link

V1: made waiting for peer connections cancellable #30

Closed jmgraeffe closed 10 months ago

jmgraeffe commented 10 months ago

This pull request is a feature addition for version 1. It should be rewritten for version 2 so it does not branch in terms of functionality.

It adds the smp.WaitForPeerConnectWithContext function that, in addition to the exact features of smp.WaitForPeerConnect, accepts a cancellable context so that it can be stopped from blocking indefinitely without killing the whole application. In the process, socket.WaitForIncomingConnWithContext was introduced as well.