Click to See Complete Forum and Search --> : Strange problems with a Socket!
whitenoise
December 29th, 2004, 09:36 AM
Hi I create two apps, one that work as a server and one that work as a simple client...
If i try to connect to the server using 127.0.0.1 everthing is working well but if i try to use the real ip address 127.xxx.xxx.xxx i get no connection with error 10061!!!!
Can someone help me!
thanks in advance
G.v.
NoHero
December 29th, 2004, 09:48 AM
The error 10061:
WSAECONNREFUSED
(10061)
Connection refused.
No connection could be made because the target machine actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.
So the server does not run on the specified IP address therefore the remote port is closed. This error occures if you try to connect to a remote host on a specified port and there is no service wait for an incoming connection at the port.
whitenoise
December 29th, 2004, 10:32 AM
thank you but :
1) I open the server, which can accept up to 10 connections
2) I open the first client, using 127.0.0.1
3) I open the second client, using 172.XXX.XXX.XXX
4) the first client is able to connect
5) the second client doesn't connect with error 10061 and the server is up and running!
NoHero
December 29th, 2004, 11:16 AM
127.0.0.1 is the local host, so yourself. 172.XXX.XXX.XXX is not a valid address. So you have to specify a complete valid address the client should connect too.
whitenoise
December 30th, 2004, 03:14 AM
the address 172.xxx.xxx.xxx is right i masked the address because is public!
Tomcat
December 30th, 2004, 08:12 AM
the address 172.xxx.xxx.xxx is right i masked the address because is public!
Is that the actual IP on the computer you're connecting to, or are you trying to connect through the IP of a router or firewall?
whitenoise
January 3rd, 2005, 08:11 AM
is the real address, no router or firewall :(
NoHero
January 3rd, 2005, 08:38 AM
is the real address, no router or firewall :(
maybe the remote port is not open? Or the remote service is down?
Try to post runable code so we can try it too.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.