Page 1 of 1
OpenConnection
Posted: Tue Jan 12, 2016 2:33 pm
by boberski
Hi,
can somebody write me an example how to use OpenConnection function?
TIA

Re: OpenConnection
Posted: Thu Jan 14, 2016 3:26 pm
by CWO
From the looks of it and from what's mentioned in the core-changes.txt at the time it was implemented, this looks like the same thing as an AUX connection except POL initiates the connection instead of the outside source.
Re: OpenConnection
Posted: Fri Jan 15, 2016 8:01 am
by boberski
Yeah I know that....
OpenConnection( host, port, scriptdef )
Parameters:
host Target host
port Target port
scriptdef Name of the script to be started when the connection is established
Explanation
creates an outgoing TCP/IP connection
Return values
1 on success
I mean for example what is the structure of scriptdef script.
Re: OpenConnection
Posted: Fri Jan 15, 2016 10:14 am
by Nando
I confess that the doc on OpenConnection is lacking, but it should work the same as an aux connection (as far as I can see it in the code). Try to make a script like this:
http://docs.polserver.com/pol099/script ... viceScript
Let me know if there are problems.