I am having an static IP (amazon ec2 instance) and a defined port which is connected to a device. This device send data on this particular port usually every minute over the GSM network.
For eg.172.20.1.170 is the IP and 4001 is port.
I am using C# socket to read the data but it is giving error "No connection could be made because the target machine actively refused it 172.20.1.170:4001"
Please suggest the sample code to read the data from the IP and port