Page 1 of 1

Solved: tsNetPost not working for me

Posted: Sun Apr 22, 2018 12:40 am
by raugert
I can post the following to vMIx server and it works good:

Code: Select all

post "Function=CutDirect&Input=1" to url "http://192.168.100.129:8088/API/"
but if I try to use "tsNetPost" to do asynchronous posts, I can't get it to send the command...

Code: Select all

put tsNetPost("1", "http://192.168.100.129:8088/API/", ,"Function=CutDirect&Input=1", "function complete") into tResult
I'm missing something :? Using LC Indy 9.0

Re: tsNetPost not working for me

Posted: Sun Apr 22, 2018 8:17 pm
by jacque
This may help:
http://lessons.livecode.com/m/4071/l/69 ... -callbacks

There are a number of other lessons about tsNet in the side panel.

Re: tsNetPost not working for me

Posted: Mon Apr 23, 2018 5:47 am
by raugert
thanks Jacque,

After carefully reading the lessons and a lot of experimenting, I finally got it to work. I discovered that I had to initialize "tsNetInit". I guess I missed that somewhere in the lessons :wink:

I also found that I must close the connection "tsNetCloseConn "1" after every call, otherwise I kept getting errors.

After many hours of trying things, I got it to work ! It sure is nice to have asynchronous posts..

thanks,
Richard