]> git.ipfire.org Git - thirdparty/curl.git/commit
cf-socket: improve SO_SNDBUF update for Winsock
authorJay Satiro <raysatiro@yahoo.com>
Sun, 26 May 2024 18:56:24 +0000 (14:56 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Thu, 30 May 2024 17:56:37 +0000 (13:56 -0400)
commitacb9effcdd647b6daf753526ac18c84cb903ee72
treeccd1256b8cb405d30c477aa0d22197f69e6038ce
parentdace891e38dfe5122d5cd77ff210fea61ac7a382
cf-socket: improve SO_SNDBUF update for Winsock

- Rename: Curl_sndbufset => Curl_sndbuf_init

- Rename: win_update_buffer_size => win_update_sndbuf_size

- Save the last set SO_SNDBUF size to compare against so that we can
  avoid setsockopt calls every second.

This is a follow-up to 0b520e12 which moved the SO_SNDBUF update check
into cf-socket. This change improves it further by making the function
names easier to understand and reducing the amount of setsockopt calls.

Closes https://github.com/curl/curl/pull/13827
lib/cf-socket.c
lib/cf-socket.h
lib/ftp.c