Use the new libportal API to start a CreateSession2, then set the
session persistence and read/write the tokens as required. This allows
us to start a server without a permission dialog - provided the portal
supports it and the user is ok with that.
This fix prevents TCP sockets from accumulating in CLOSE_WAIT following a
network interruption.
StreamInputShutdown ignored events that occurred while waiting for parts of a
partially received packet.
This could prevent the higher-level state machine from receiving the disconnect
signal and closing the socket.
The filter now correctly treats a stream closure during mid-packet reception as
a protocol error, ensuring the disconnect event is propagated, and proceeds with
the shutdown.
This fix addresses a busy-loop and stalled connection issue during the TLS
handshake. Previously, SecureSocket incorrectly managed its readiness flags
during negotiation, often polling for 'writability' when OpenSSL was actually
waiting for more 'read' data (or vice versa).
- Explicitly maps SSL_ERROR_WANT_READ and SSL_ERROR_WANT_WRITE to
socket multiplexer events.
- Resets readiness flags before each handshake attempt to ensure the
multiplexer receives the most accurate requirements from OpenSSL.
- Restores readability/writability flags upon a successful handshake
to allow subsequent application-layer protocol exchange.
- Removes inefficient busy-wait sleeps that were masking the loop
and slowing down handshakes.
Deskflow previously lacked support for TCP keepalive, which meant that
dead connections (such as those resulting from a terminated SSH tunnel
or an ungraceful network interruption) could remain in the system's
connection table indefinitely.
This commit adds the setKeepAliveOnSocket method to the IArchNetwork
abstraction and implements it for both BSD/Unix and Winsock/Windows
backends. Keepalive is now enabled by default in TCPSocket::init,
allowing the operating system to eventually detect and clean up
stale connections.