nareix / joy4

Golang audio/video library and streaming server
MIT License
2.67k stars 499 forks source link

Close() on RTMP server #26

Open ericxtang opened 7 years ago

ericxtang commented 7 years ago

Right now there is no way to close the RTMP server manually. The Golang http package is an example to follow here - https://golang.org/pkg/net/http/#Server.Close

@nareix I'm happy to make a PR - keep a reference to the listener in rtmp.Server{}, and add a Close() function to call listener.Close(). Does that sound reasonable?