[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference jamin::pathworks32

Title:Digital PATHWORKS 32
Moderator:SPELNK::curless
Created:Fri Nov 01 1996
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:337
Total number of notes:1612

325.0. "Why use Winsock 2 if 1.1 always there?" by DECALP::KLAVINS (Ed Klavins, RTR Engineering) Fri May 30 1997 04:55

    Hi,
    
    If we have a program written using Winsock 1.1 (TCP and DECnet) on NT,
    this is still expected to work with PW32 on NT4 (which includes
    Winsock2 in the base OS). So far so good.
    
    I'm wondering, though, why would we want to modify the program to use
    Winsock2?
    
    Given that WSOCK32.DLL is present anyway (as a shim over WS2_32.DLL),
    we would always have the Winsock 1.1 API available on any system that
    has Winsock2 installed. Also, since Winsock2 is installed, any other
    vendor can add their transport-specific providers without problem.
    
    About the only reason I can think of is that to use Winsock 1.1 with
    DECnet we're using the additional DNETW. But given that it might take
    years until Winsock2 is as ubiqitious as Winsock 1.1, I imagine that
    DNETW would be around for years as well. I can see no other reason to
    move to Winsock2 other than it's the 'proper' way. 
    
    On the other hand, the big
    disadvantage I see moving to Winsock2 is that our program would still 
    need to provide backwards compatability with Winsock 1.1 for those
    systems that don't have Winsock2 installed. We can avoid the added
    complexity of code (determining which Winsock available, doing
    LoadLibrary of WSOCK32 or WS2_32 respectively, etc.) by just using
    Winsock 1.1 and basta.
    
    Any comments appreciated.
    
    ed
T.RTitleUserPersonal
Name
DateLines
325.1SPELNK::curlessFri May 30 1997 11:3314
There are additional functions and support that makes Winsock 2.0 superior
in performance over 1.1.

There is a MAJOR BUG in the implementation of the Winsock 1.1/2.0 software
currently available from Microsoft... the bug is, in Winsock 1.1, under NT
v3.51 you could perform a select() over multiple transports... in 
Winsock 1.1/2.0, NT v4.0 you CANNOT do this, you must separate the selects,
or use other mechanisms... 

In other words... software written for Winsock 1.1 may NOT work on NT v4.0
it depends on how it was written.

Jeff
325.2DECALP::KLAVINSEd Klavins, RTR EngineeringFri May 30 1997 17:4314
> There is a MAJOR BUG in the implementation of the Winsock 1.1/2.0 software
> currently available from Microsoft... the bug is, in Winsock 1.1, under NT
> v3.51 you could perform a select() over multiple transports... in 
> Winsock 1.1/2.0, NT v4.0 you CANNOT do this, you must separate the selects,
> or use other mechanisms... 
> 
    Wow. This is a bug? I'm glad I found this out now up front...
    
    When you say Winsock1.1/2.0, do you mean "Winsock 1.1 running on top of 
    Winsock 2" only?
    
    Question is: can you select over multiple transports using Winsock 2?
    
    ed
325.3no multiple selectsJAMIN::KROBINSONMon Jun 02 1997 10:004
In winsock 2 or winsock 1.1 running "on top of" winsock 2, you can NOT call select() with multiple transports. 
This is due to the architecture of ws2.

Ken