Jump to content
Sign in to follow this  
Zoli1972

Getting error 10061 from TCPSend

Recommended Posts

Zoli1972

Hi.

I wrote a little script to remotely control my home pc via internet and VPN, using the TCPSend function. The VPN connection is going via 384kBit 3G (UMTS) at work to the dyndns address of my home PC that is attached to a 6Mbit ADSL line. Both PCs are placed behind a router. Both PCs and routers have got enabled the port for VPN communication. The local (VPN) addresses are 10.0.3.1 for home and 10.0.3.2 for my laptop at work. Often TCPSend is not working on that particular connection. It says "10061" in @error just after calling the function TCPSend, so that my script aborts, what it is supposed to do on error. At that time, my TCPReceive-script is still running at home and waiting for input. I am using the same script to control things via local network while being at home without having problems that much.

Any help appreciated

Zoli

Edited by Zoli19721

Share this post


Link to post
Share on other sites
SadBunny

Hi!

Quoted from the helpfile: Failure: Returns 0 and set @error according to Windows API WSAGetError return.

This means that the error is set by a module in Windows that manages your connection for you (we call it winsock, there's a more elaborate official term for it but I can't think of it now :P). These are the same errors that are thrown when other programs ask Windows to make a connection (like the AutoIt engine does when you execute code for a connection request).

Here's a snippet of a document we tend to send to our customers about connection troubleshooting:

Googling these winsock error gives us many long, long error lists, but most of them are very very rare. The winsock 10061 error is one we see pretty much daily at our customers, and will usually have to do with either a firewall blocking your connection (though the Windows firewall doesn't by default block outgoing connections) or, also common: running peer-to-peer software or other software that maxes out your connections count.

Also something could be wrong with your hostfile (check c:\windows\system32\drivers\etc\hosts) or any other means of routing like a hardware router or maybe some software like MS ISA server or the likes if you're on some corporate or school network. To be sure routing is ok, try tracert <ip-address or hostname> from a commandline to find out where your connection goes.

You might want to try using telnet to try and connect manually, to troubleshoot the connection.


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.