Multiple unique clients

Hi, I'd like to use OSC with multiple devices and was wondering if there's a way to use a single server instance to serve up two different interfaces for two different devices (with different aspect ratios). Is this possible, or do I have to run multiple instances of OSC?

If the clients open different session files, i think it is possible. Client a and b open 01.json, client c,d,e opens 02.json. But only the clients using the same session file will see the ui updated.

Is there an easy way to have the clients open different session files without having to go through the interface? Ideally session file 1 would auto open at one IP and session file 2 would auto open at another ip

There is only one way to do it, using a custom module :

// map ip addresses to session files 
var sessions = {
    '127.0.0.1': 'path/to/a.json',
    '192.168.1.1': 'path/to/b.json'
}

app.on('open', (data, client)=>{
    // when a client connects
    
    var ip = client.address,
        id = client.id

    console.log(`client connected with ip ${ip}`)

    // check if we have a session for this ip address
    if (sessions[ip]) {
        
        console.log(`-> loading ${sessions[ip]}`)

        // send a remote control command to that client
        // to make it load the appropriate session
        receive('/SESSION/OPEN', sessions[ip], {clientId: id})
        
    } else {
        
        console.log('-> no session associated with this ip')
        
    }
})

References:


Not quite. See Client synchronization.