✅ How to make Event and Delegate to Subscribe to the LocalHost
I am trying to make a c# copy of an existing java program. The individual items I need to capture are clear, but I lack the C# sharp knowledge needed to actually get the program to listen to the local host. My apologies if the problem listed here is vague, but I am lacking some basic knowledge myself.
11 Replies
like listen on a port?
yes
at the very basic level, I want to be aware when the local host shuts down while the program is running
what do you mean
so I have a shell that runs a service on my localhost:8888
if I run the program while the service is up, and then I shut down the service, I want the program to be aware of it
I plan to do more, but this basic confirmation that it is listening what I cant figure out
I think you'll need to poll it
I am unfamiliar with poll
continuously checking if you can reach the server
yes, that sounds perfect
use an HTTP client probably
or like a TCP client
depends on what the server does
the end goal is to have it populate with different objects that behave according to their jars
the objects already mapped in java, so moving them over is something i can do
but for now I just need to send the C# program to be able to keep track of the service
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.