I'm new to Silverstripe and I'm trying to extend an existing site, so sorry if the answer to this question is obvious.
I'm trying to connect via TCP to an external device if an event happens.
I've made a controller for this which is in a different php file than the one in which the event happens.
Can I call my TCP connect function with something like controller::socketConnectController()?
Or do I have to redirect to the controller via a director::addrules?
Maybe the way I implement this is not rigth at all but this, is what I though would be a good solution.
I hope it is clear what I want :)