On Sat, 21 Nov 2020, 2:12 am Afriyie Abraham Kwabena, <
afriyie.abra...@gmail.com> wrote:

> Hi,
>
> Yes, that is what intend to implement. Can you help with some information
> about how
> I could implement it.
> If possible some libraries or example code.
>

The standard library's http client as defined in net/http uses a transport
layer connection pool already. I believe it will take care of the scenario
you are trying to solve.

This issue https://github.com/golang/go/issues/23427 has some relevant
discussions and starting points for you to explore more. I also recommend
looking at this post https://blog.golang.org/http-tracing for further
research


Abraham
>
> On Friday, November 20, 2020 at 1:07:12 PM UTC+2 Afriyie Abraham Kwabena
> wrote:
>
>> Hi,
>>
>> Am new to programming and if you could explain further what you mean by
>> long lived process.
>>
>>
>> On Friday, November 20, 2020 at 11:41:42 AM UTC+2 amits...@gmail.com
>> wrote:
>>
>>>
>>>
>>> On Fri, 20 Nov 2020, 7:51 pm Afriyie Abraham Kwabena, <
>>> afriyie...@gmail.com> wrote:
>>>
>>>>
>>>> Hi,
>>>>
>>>> My basic understanding of HTTP protocol is that an HTTP client sent
>>>> request, get response from the HTTP server and then the connection is
>>>> closed.
>>>>
>>>> My question is how can an HTTP client detect if the underling transport
>>>> connection break. For example if the HTTP server shutdown, is there a way
>>>> to detect that at the client so that the client can start a persistent
>>>> request.
>>>>
>>>> If possible, how can I do that in golang HTTP client?
>>>>
>>>
>>> Are you thinking about implementing a connection pool for your long
>>> lived process?
>>>
>>>
>>>
>>>> BR
>>>> Abraham
>>>>
>>>>
>>>> --
>>>> 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...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/golang-nuts/4937b529-c1aa-4425-8b81-01214c1fc1f7n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/golang-nuts/4937b529-c1aa-4425-8b81-01214c1fc1f7n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/d2125284-5529-4c95-82c7-3a8dac7fde78n%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/d2125284-5529-4c95-82c7-3a8dac7fde78n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CANODV3khLBfdEW5HnWv2P6reBNJsxnxL9mBgD%3D6-wkDUBONjdg%40mail.gmail.com.

Reply via email to