Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
SockGetHostName & SockGetHostByAdd No return an error code even if the waiting time more than 10 hours (server is running, but does not work, internet Explorer returns a 404 error)
ooRexx-4.0.0.i586.exe and ooRexx-4.0.1.i586.exe for Windows XP pach 3
You seem to have CSS turned off.
Please don't fill out this field.
Thanks for submitting this bug report, the development team appreciates it.
However, please attach a working program that demonstrates what you believe the problem to be.
That would be especially important in this case, because 4.0.1 doe not have SockGetHostName() or SockGetHostByAdd() functions.
In addition, the SockGetHostByName() and SockGetHostByAddr() functions both return immediately. So, I don't understand what you mean by "even if the waiting time more than 10 hours"
All of that aside, both functions work fine for me:
Open Object Rexx Version 4.0.1
Build date: May 2 2010
SockGetHostByName(www.abc.com) ret: 1 errno: 0 addr: 184.108.40.206
SockGetHostByAddr(220.127.116.11) ret: 1 errno: 0 name: chris-test.go.com
Open Object Rexx Version 4.0.0
Build date: Aug 15 2009
Possibly you had a temporary problem with your network stack, or you may not have your network set up correctly.
Example program showing working functions
From your e-mail:
"Message body follows:
If Server running and good work ->Rc OK!
If Server NOT running ->Rc OK!
If Server running and BAD work ->not retun RC!!!! :(
The program was written to identify it does not work
correctly, the server. When the server is running but not
responding to user requests to restart the server.
I was going to use these functions.
When the server is running does not work, these functions do
not return the response, even for a few hours.
And if while waiting for the server was rebooted and is
working correctly, these functions do not return the answer.
I propose to limit the time waiting for a response by those
functions, at the expiration of the time limit to return an
1.) I don't know what server you are talking about.
2.) It works fine for me whether the host I am looking up is working or not. Here's a simple example. My system at 192.168.1.7 is not powered up:
if 0 \== RxFuncQuery("SockLoadFuncs") then do
j = RxFuncAdd("SockLoadFuncs","rxsock","SockLoadFuncs")
j = SockLoadFuncs()
width = 35
dottedAddrs = .array~of('192.168.1.2', '192.168.1.3', -
'192.168.1.4', '192.168.1.5', -
do addr over dottedAddrs
func = 'SockGetHostByAddr('addr')'
func = func~left(width)
ret = SockGetHostByAddr(addr, 'b.', 2)
say func 'ret:' ret 'errno:' errno 'name:' b.name
SockGetHostByAddr(192.168.1.2) ret: 1 errno: 0 name: Eagle
SockGetHostByAddr(192.168.1.3) ret: 1 errno: 0 name: osprey
SockGetHostByAddr(192.168.1.4) ret: 1 errno: 0 name: Falcon
SockGetHostByAddr(192.168.1.5) ret: 1 errno: 0 name: Egret
SockGetHostByAddr(192.168.1.6) ret: 1 errno: 0 name: FALCON
SockGetHostByAddr(192.168.1.7) ret: 0 errno: NO_DATA name: B.NAME
It takes about 3 seconds for the 192.168.1.7 query to time out. But, SockGetHostByAddr() works fine.
3.) The rxsock package merely allows Rexx programmers access to socket functions. How the socket functions work, is not under the control of ooRexx. The documentation indicates that. For SocGetHostByAddr it says:
The value 1 indicates successful execution of the call. The value 0 indicates an error.
Note: SockGetHostByAdress() interfaces with the C function gethostbyaddr().
4.) When gethostbyaddr() returns is dependent on how you have set up your network, in particular how the resolver is working. The resolver should timeout if a remote name server doesn't respond and should try multiple name servers.
If gethostbyaddr() never returns, you don't have your network set up correctly.
Which, in all fairness, is not an ooRexx bug. <grin>
Hey Sergy, I hate to close this if you truely think it is an ooRexx bug. But, at the same time, I really don't think it is an ooRexx bug.
Since you haven't responded, I'm going to assume you agree with me and close this.
However, I have no problem with you re-opening it if you think I'm wrong. Just re-open the bug and tell me why you think I'm wrong.