I am working on creating c# socket application and server side. I need to create one C# windows service which will should create a TCP connection and listen/establish a connection with a client on a certain address/port . Lets say example : 172.00.000.0/1000 and i have done that using TCPListener
And another c# windows service will use same socket/TCP connection to transmit the message with client.
This design is to make sure, the 1st windows service will hold the socket/TCP connection all the time and second windows service can be stopped/paused when there is deployment and as soon as the application is started, the socket connection starts transmitting message because, the connection is there because of 1st windows service.
question from:https://stackoverflow.com/questions/66059156/c-sharp-socket-programming-allow-2-application-to-use-same-socket-tcp-connectio