This is goroutine-safe, but users should beware that the application in general is not meant to be interfaced with concurrent callers.
| 25 | // This is goroutine-safe, but users should beware that the application in |
| 26 | // general is not meant to be interfaced with concurrent callers. |
| 27 | type socketClient struct { |
| 28 | service.BaseService |
| 29 | |
| 30 | addr string |
| 31 | mustConnect bool |
| 32 | conn net.Conn |
| 33 | |
| 34 | reqQueue chan *ReqRes |
| 35 | flushTimer *timer.ThrottleTimer |
| 36 | |
| 37 | mtx tmsync.Mutex |
| 38 | err error |
| 39 | reqSent *list.List // list of requests sent, waiting for response |
| 40 | resCb func(*types.Request, *types.Response) // called on all requests, if set. |
| 41 | } |
| 42 | |
| 43 | var _ Client = (*socketClient)(nil) |
| 44 |
nothing calls this directly
no outgoing calls
no test coverage detected