CBielstein / APRSsharp

APRS# - Modern APRS software for the amateur radio community
MIT License
12 stars 5 forks source link

`AprsIsConnection` should have a way to terminate receiving #64

Closed CBielstein closed 2 years ago

CBielstein commented 3 years ago

Description

AprsIsConnection currently can Receive() but there is no way to stop receiving and responsibly clean up the system resources (namely, the TCP port). We should implement a call on AprsIsConnection to terminate receiving.

Implementation Suggestions

A simple way to do this would be to change the while(true) in the Receive method to use a private class property boolean. That should be set to true at the beginning of Receive and then we could add a new method called StopReceiving() or something similar to set that to false. Then the next loop will terminate the loop and end the Receive task.

Acceptance Criteria