ports/devel/electron33/files/patch-net_socket_tcp__socket__posix.cc
Hiroki Tagato 9c04d144dd devel/electron33: add port: Build cross-platform desktop apps with JavaScript, HTML, and CSS
Build cross platform desktop apps with JavaScript, HTML, and CSS.

It's easier than you think.

If you can build a website, you can build a desktop app. Electron is a
framework for creating native applications with web technologies like
JavaScript, HTML, and CSS. It takes care of the hard parts so you can
focus on the core of your application.

WWW: https://www.electronjs.org/
2024-11-13 23:41:37 +09:00

20 lines
731 B
C++

--- net/socket/tcp_socket_posix.cc.orig 2024-10-16 21:31:36 UTC
+++ net/socket/tcp_socket_posix.cc
@@ -98,6 +98,17 @@ bool SetTCPKeepAlive(int fd, bool enable, int delay) {
PLOG(ERROR) << "Failed to set TCP_KEEPALIVE on fd: " << fd;
return false;
}
+#elif BUILDFLAG(IS_FREEBSD)
+ // Set seconds until first TCP keep alive.
+ if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &delay, sizeof(delay))) {
+ PLOG(ERROR) << "Failed to set TCP_KEEPIDLE on fd: " << fd;
+ return false;
+ }
+ // Set seconds between TCP keep alives.
+ if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &delay, sizeof(delay))) {
+ PLOG(ERROR) << "Failed to set TCP_KEEPINTVL on fd: " << fd;
+ return false;
+ }
#endif
}