add an HTTP call and notify listeners
(call *HTTPCall)
| 65 | |
| 66 | // add an HTTP call and notify listeners |
| 67 | func notifyHTTP(call *HTTPCall) { |
| 68 | httpMu.Lock() |
| 69 | defer httpMu.Unlock() |
| 70 | |
| 71 | httpCalls = append(httpCalls, call) |
| 72 | for _, l := range httpListeners { |
| 73 | l <- call // TODO: make non-block if necessary |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | // close all HTTP listeners so that the receiving end can exit |
| 78 | func finishHTTP() { |