Glen, yes, I was joking. The code below will fall through a failed bind and
attempt a listen, just as you described.  I've seen CASE 1 clauses execute
"STOP;*IMPOSSIBLE" and the //comment below reflects this sort of
overconfidence.  If that's the code in the UV telnet server, indeed it's
being naughty.  While I give IBM more credit, there are some qualified
professionals here who can't find any errors if UV is throwing them.  I'll
leave it to someone who cares to determine if either of these conditions
reveal a problem that needs to be addressed.
T


Glen Batchelor wrote: 
>   I hope I'm not missing sarcasm here. If bind() was being trapped on
> errors then listen() wouldn't have been executed, so my statement
> about listen() is false. I should have said bind(), to be
> programmatically correct in that case. I call "listen" the whole
> 'socket(),bind(),listen()' code thing. 

>> Tony G wrote
>> Probably AssUMed the bind was successful:
>> 
>> if(-1 == bind(i32SocketFD,(struct sockaddr*) &stSockAddr,
>> sizeof(stSockAddr))) {
>>  // impossible, environment is perfect, can't possibly fail here. ;)
>> }
>> if(-1 == listen(i32SocketFD, 10))
>> {
>>   // error 100038, don't tell anyone, just die
>>   exit(-1);
>> }

>> Glen Batchelor wrote:
>>> Winsock 100038 is "Error - that is not a socket". Something, in the
>>> code, is trying to listen on a non-socket file descriptor. Naughty
>>> Naughty!
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to