How to create TCPListener windows service usingC#
Hi guys,
I am trying to create TCP Listener windows services using C# to listen to a local TCP port continuously.
I have written a windows console application which does the job properly but when I convert it to windows services it did not work, as you know definitely I can not use infinity loop on the OnStart method but I want the services to keep listen to synchronous connection by a client and send response when data received.
The senior as following:
I want to listen to a port which I will receive a string 200 characters from a client then send response as acknowledgement.
By the way this talk about the same topics "thread: C# Socket Programming" listed before but I want to do it as windows services
Your response is highly appreciated.
Regards,
|