mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-09 15:09:08 +02:00
[client] Port the file drop bindings to iOS
The iOS SDK package gets the same platform handle the Android bindings carry: transfers, receiving policy, and per-sender rules on one profile, attached to the engine when the client starts. Payloads are path-based rather than stream-based, since the app group container is readable from both processes, and the platform sink is dropped for the same reason: delivery lands on the filesystem directly. The default destination is seeded in the constructor because the app process opens handles of its own while the extension is down.
This commit is contained in:
@@ -93,6 +93,9 @@ type Client struct {
|
||||
stateMu sync.RWMutex
|
||||
connectClient *internal.ConnectClient
|
||||
config *profilemanager.Config
|
||||
|
||||
fileDropMu sync.Mutex
|
||||
fileDrop *FileDrop
|
||||
}
|
||||
|
||||
// NewClient instantiate a new Client
|
||||
@@ -189,6 +192,7 @@ func (c *Client) Run(fd int32, interfaceName string, envList *EnvList) error {
|
||||
connectClient := internal.NewConnectClient(ctx, cfg, c.recorder,
|
||||
internal.WithNetEvents(c.netMgr))
|
||||
c.setState(cfg, connectClient)
|
||||
c.attachFileDrop(connectClient, c.cfgFile)
|
||||
// Persist the latest sync response so DebugBundle can include the network
|
||||
// map. On iOS this is backed by disk to keep it out of the constrained
|
||||
// process memory (see the syncstore package).
|
||||
|
||||
Reference in New Issue
Block a user