Currently, I am using http GET requests to connect to a server.
Get
request is calling from inside a thread. For each Get
request one thread is being used but problem is for each Get
request, one connection is established. Thus if there are 10000 Get
request then 10000 connections will be established. However, I want first to establishe a TLS connection between me and the server, then create a thread and from that thread I want to send Get
over that already established connection.
e.g.
for {
1. establish a tls connection
2. create thread go func()
}
func() {
resp, err := http.Get(url) // should be over already established tls connection
}