Andrew H Posted April 29, 2021 Share Posted April 29, 2021 I am writing a driver that needs to be able to dynamically create and destroy SSL connections in order to connect (and disconnect) to an indeterminate number of devices. Due to the inherent unpredictability of how many devices will be connected at a given time, I need this to be able to be done programmatically. I'm comfortable enough with Lua, and have written a few simple drivers before, but none with this type of requirement. I'm essentially looking for the opposite of C4:CreateNetworkConnection(). Can someone point me in the right direction? I looked at the example drivers provided on C4's Github and it looks like they use C4:NetDisconnect() calls to 'remove' connections created with C4:CreateNetworkConnection(). I attempted this approach, but all it seems to do is to temporarily (until my reconnect handler executes) break the connection, without actually removing it. So far, the only thing I've found that will remove the connections is doing a driver reboot, but I'd like to avoid having to do that every time I need to remove a connection. Thanks all! Quote Link to comment Share on other sites More sharing options...
videostorm Posted April 29, 2021 Share Posted April 29, 2021 What port are you connecting to? Quote Link to comment Share on other sites More sharing options...
RyanE Posted April 29, 2021 Share Posted April 29, 2021 You can reuse binding IDs and call C4:CreateNetworkConnection with a different address on the same binding id. Not sure what the issue is with doing that. As long as you don't do a C4:NetConnect, having dynamic network connections created doesn't really take any resources. RyanE Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.