title: How to reuse the same HTTPS connection for many put requests within a session?
body: <p>To send files to server, I do a HTTPS put request in Windows, which looks like this:</p>
  
  <pre><code>hSession = WinHttpOpen(  L"Agent/1.0",..
  hConnect = WinHttpConnect(hSession,..
  hRequest = WinHttpOpenRequest( hConnect, L"PUT",..
  WinHttpSetCredentials(hRequest,..
  WinHttpAddRequestHeaders( hRequest,..
  WinHttpSendRequest( hRequest,..
  WinHttpWriteData(hRequest,..
  WinHttpReceiveResponse(hRequest,..
  WinHttpQueryHeaders(hRequest,..
  if (hRequest) WinHttpCloseHandle(hRequest);
  if (hConnect) WinHttpCloseHandle(hConnect);
  if (hSession) WinHttpCloseHandle(hSession);
  </code></pre>
  
  <p>This pack of command is run for every file, which should be sent to server. Establishing the connection from scratch for every file to be sent creates additional overhead. Now I'm looking for a way to reduce this overhead.</p>
  
  <p>So I have two questions:</p>
  
  <ul>
  <li>Is it necessary to open and close a new HTTPS connection for each put request?</li>
  <li>Is there a way to establish a session and reuse the same HTTPS connection for many put requests within this session?</li>
  </ul>