How to auto change system with connection status?

80 views
Skip to first unread message

ARINA Smarthome

unread,
Aug 5, 2013, 1:22:17 AM8/5/13
to comman...@googlegroups.com
 I have two protocol UDP and TCP. When I at home I want to use UDP protocol but when I go out I want auto change to system with TCP protocol. How to auto change system with connection status ?

Jarrod Bell

unread,
Aug 5, 2013, 1:33:00 AM8/5/13
to comman...@googlegroups.com
You cannot change a system protocol information at runtime, only some properties such as IP Address and Port number:
http://commandfusion.com/docs/scripting/net.html#cF.setSystemProperties

You would need to have two systems defined in your GUI, one for UDP and one for TCP.
Then you can enable one and disable the other at runtime via some JavaScript calls as per the examples in the docs linked to above.

http://commandfusion.com/docs/scripting/net.html#cF.systems

By default, the systems will list 'connections' as empty (disconnected) so you would need to come up with some other logic, such as perhaps monitoring the network status change event, and using the CF.networkType and CF.networkSSID properties:
http://commandfusion.com/docs/scripting/net.html#cF.NetworkStatusChangeEvent
http://commandfusion.com/docs/scripting/net.html#cF.networkType

Regards,

Jarrod Bell
CommandFusion
www.commandfusion.com


On 5/08/13 3:22 PM, ARINA Smarthome wrote:
 I have two protocol UDP and TCP. When I at home I want to use UDP protocol but when I go out I want auto change to system with TCP protocol. How to auto change system with connection status ?

--
You received this message because you are subscribed to the Google Groups "CommandFusion Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commandfusio...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages