Re: [go-nuts] Re: Serialized HTTP requests with asynchronous responses

2017-09-27 Thread Donovan Hide
Seems like a simple solution is just to write HTTP requests over a single TLS connection and queue the requests and responses in order. Can't handle redirects or reconnections, but works for my purposes: https://gist.github.com/donovanhide/13c903416e166ac51c9496d225e9 -- You received this me

Re: [go-nuts] Re: Serialized HTTP requests with asynchronous responses

2017-09-27 Thread Gabriel Sullice
If it's imperative they're received in order, you cannot do anything accept wait for at least the first byte of the response. You'll never know if the request was fully received until that point. Even then, only that it was _received_, not validated (e.d. 400 response). If it is _not_ imperativ

Re: [go-nuts] Re: Serialized HTTP requests with asynchronous responses

2017-09-26 Thread Donovan Hide
The nonce is intended just to stop replay attacks. It doesn't have to increment with a delta of 1, typically you just use time.UnixNano(). The API is not under my control, I just want to minimise the occurrence of nonces being received out of order by the API. -- You received this message because