WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Winsock
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Winsock: Error 10110 and Specifying Host Name

Keywords: 

Question:

I am getting the "Winsock: Error 10110" error when I try to connect to a port, the wxGetLastErr for sConnect returns this error code.
socket=sOpen()
;Connect to host, using port number 9000 for this application

;Created a line in the services file in Winnt called CheckProc
Connection=sConnect(socket,"126.9.0.7","CheckProc")
;Check to see if the connection is valid to host
err=wxGetLastErr()
msg=wxGetErrDesc(err)
Message("Winsock Error A %err%",err)

If connection == @FALSE
Message("Connection Error", "Mainframe Connection Not Present. Please Call the Helpdesk.")
GoSub Top
EndIf

Answer:

Hmmm.. The error is:
WSA_E_NO_MORE 
There is no more data available. 
I'm not sure exactly what it means. It seems to be trying to look up a service name or something and not finding it.

If you could post the statement you are having problems with we can look at it.

Maybe, if you are using a service name, use the service port number instead?

Also be aware of a very *strong* limitation of the WinSock extender. If you use a name like www.yoohoo.com the DNS server must resolve correctly. This is expected. If you use an ip address like 126.9.0.7 is MUST be properly "reverse DNS served" so that if you try to do a:

ping -a 126.9.0.7
the address resolved to a reasonable host name. The WinSock extender cannot communicate with just an ipaddress. The machine it is communicating with MUST be fully recognised by your DNS servers.

It appears the 126.x.x.x range it not a legal Internet address. It could be on a private network, or a result of NAT translations. It is possible a DNS server could be set up to handle it, but it is not likely.

Question (cont'd):

Something about this I don't understand...

To do a "test" of this, I created a winbatch server program on an NT. I connected just fine. As soon as I switched over to the Unisys, I had a problem. Perhaps I need to edit the host file locally.

Resolution:

I had to add an entry to the "hosts" file for that IP number. I gave it a random name since it's irrelevent inside our private network.

The two things that had to be present was the naming of the IP in the hosts file and I had to specify the service port and service name in the services file.

We're running this program on a WindowsNT Workstation 4.0.

Hope this will help others with a similar error.


Article ID:   W14443
Filename:   Winsock Error 10110 and Specifying Host Name.txt
File Created: 2017:07:28:13:58:55
Last Updated: 2000:03:27:17:44:06