JustinTimperio / gomap

A fully self-contained Nmap like parallel port scanning module in pure Golang that supports SYN-ACK (Silent Scans)
MIT License
86 stars 19 forks source link

Add context version of main functions #17

Open a-urth opened 1 year ago

a-urth commented 1 year ago

Problem: since main scanning functions use goroutines there is no way to stop them externally if used as library. Solution: add new function which accept content as first parameters. In main loops of goroutines check for context in select statement and shutdown in case it closed.

a-urth commented 1 year ago

It looks like codacy is running still on first commit and gives error disregard that issue is fixed.