I have a desktop app that uses a ServerSocket to listen on a port and a TCPSocket to communicate a message back once a connection is established.
I am trying to convert this into a windows system service. I have never tried to create a service before in RS so I really know nothing about the rules here. I have tried to add the ServerSocket and TCPSocket to global classes but I cannot access them from the service run method like I could before using the event handlers.
The easiest way to access the event handlers is to create your own ServerSocket subclass and then implement the event handlers there. In the Run event of the service app, you can instantiate your subclass and tell it to start listening. Do the same thing for TCPSocket.
Thanks Wayne for the example I nearly had it figured out but with one look at your example project I was able to see my one mistake. Working perfectly now!