The problem that we are facing in windows service is that we are unable to send the socket through
The problem that we are facing in windows service is that we are unable to send the socket through windows application running on one computer to the windows service running on another computer. The following are the steps that we have followed.
At Window Service Side running on Computer A:-
· We have created a window service and under OnStart event we have initialize the object of TCP listener through port 8001.
· Start the TCP listener.
· Made a thread for WaitingForClient and start this thread so that it always lies in listen mode for accept the socket from Computer B.
· In the method WaitingForClient we have accepted the socket and start another thread for read this socket.
At Window Application running on Computer B:-
Made a socket that has AddressFamily InterNetwork, SocketType is stream and ProtocolType is TCP.
Made the object of IPEndPoint by initialize it through IP address of Computer A and Port 8001.
When we connecting this socket to the Computer A through IPEndPoint, it does not connect and throws the exception of connection timeout.