Edit globals var at runtime from scripts (target, port...)

Hi,
For a project of a controller for a midas M32 (and x32 and all this kind), i've make the network discovering logic.
But now i search for put the target IP as session's default target.
How can i do it ?
For now, i try to not use custom module, but isn't a requirement.

Thank's !

Launching the server with the appropriate send option seems to be the simplest solution.