wrap listener and hack it, It maybe can work 在 2016年8月16日星期二 UTC+8上午8:33:54,xtalk1写道: > > If possible, I would like to write a Go program that does the following: > > 1. Calls http.ListenAndServe() or http.ListenAndServeTLS() (in its own > goroutine, of course) > > 2. Waits until http.ListenAndServe() or http.ListenAndServeTLS() is > accepting connections > > 3. Starts a web browser pointed at the host and port sent to > http.ListenAndServe() or http.ListenAndServeTLS() > > Steps #1 and #3 are, of course, no problem. #2 is a little more difficult. > > Of course, calling http.Serve() is an option, and works great as an > alternative to the http.ListenAndServe() function. > > However, replacing http.ListenAndServeTLS() presents a lot more > difficulty... I'm looking for solutions that aren't a giant copy and paste > of the source, modified for my needs, and updated each time a new release > of Go comes out. > > Any suggestions are appreciated, thanks! >
-- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.