la5nta / wl2k-go

A Winlink framework for Go.
https://getpat.io
MIT License
50 stars 20 forks source link

Context oriented DialURL for dial cancellation #78

Closed martinhpedersen closed 2 years ago

martinhpedersen commented 2 years ago

DialURLContext extends DialURL's functionality by accepting a context.Context for cancelling the dial operation. It is implemented backwards compatible, so we don't have to update all transports to support this.

It was inspired by the net.DialContext from the standard library, which supports the same use cases.

I'm also working on incorporating this into Pat, which will enable dial cancellation for stateless transports like telnet and ax25.

martinhpedersen commented 2 years ago

Marked this as a draft PR because I'm currently working on adding support. for this in the libax25 code.