Login Page - Create Account

Support Board


Date/Time: Wed, 08 May 2024 14:01:38 +0000



Winsock Initialisation & Shutdown

View Count: 965

[2018-01-27 11:33:36]
Pinger - Posts: 33
Hi

I want to send data out of SierraChart via a socket to do some external charting. I've put the Winsock initialisation code (WSAStartup(), socket(), etc) in my study sc.SetDefaults block, and this appears to be working. My query is, where to put the shutdown code (socketclose() and WSACleanup()) to ensure everything is shutdown nicely when my study is removed from a chart. Is there a function that is called when a study is removed from a chart to put such code?

Kind regards
[2018-01-27 21:51:57]
Sierra Chart Engineering - Posts: 104368
Refer to:
ACSIL Interface Members - Variables and Arrays: sc.LastCallToFunction
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account