FDH2 / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.35k stars 72 forks source link

Dear develop. How can the client end the current image actively #159

Closed nozuonodienobb closed 1 year ago

nozuonodienobb commented 1 year ago

when i mirroing, i take the another iphone to connect the app, I want to disconneted for the current client, how to do? 3k

thiccaxe commented 1 year ago

From README:

-nohold Drops the current connection when a new client attempts to connect. Without this option, the current client maintains exclusive ownership of UxPlay until it disconnects.

nozuonodienobb commented 1 year ago

how to dorp the current connection

fduncanh commented 1 year ago

There is a setting with a name like max_connections. Apple TV allows 12, I think. each client requires 2 connections.

I set max_connection to 2 to prevent a new client from connecting while a previous client is connected. a request for a third connection is then ignored.

The nohold option sets max_connections to 3. If a third connection is requested and started, I destroy the previous two connections and the new client takes over.

code is in lib/httpd.c see line 176 and 355