Module: Essential Networking Module Package: Networking
Does not inherit
#include <rw/network/RWWinSockInfo.h>
Initializes the Winsock DLL on Windows platforms. Initialization is required before your application can make requests of the Winsock API. Deregistration is required for applications that no longer need Winsock services.
Rogue Wave encourages all users to include this class in their code. While using this class does not affect the behavior of programs that run on UNIX, it does make them portable to Windows environments.
NOTE -- If you use Winsock.dll in a DLL, either directly or indirectly, you must initialize it. The fastest way to do this may be to create an instance of RWWinSockInfo in DllMain().
RWWinSockInfo(short ver=0x0200);
Initializes the underlying socket API with the requested version. If the Winsock DLL has already been initialized by this application, the constructor does nothing. An exception of type RWNetWinsockInitError is thrown if the initialization fails. This function is a no-op on non Windows platforms.
RWWinSockInfo(FARPROC blockingHook);
Initializes the Winsock DLL and installs the blocking hook indicated. The previous blocking hook is restored when the RWWinSockInfo is destroyed. Windows only. This function has been deprecated. You can refuse support for this function by defining the macro RW_DISABLE_DEPRECATED.
~RWWinSockInfo();
Performs the termination tasks.
RWCString getDescription() const;
Returns the vendor-supplied description of the Winsock DLL. The string "not winsock" is returned on platforms that do not support winsock.
int getMajorVersion() const;
Returns the vendor-supplied major version of the Winsock DLL. Returns 0 on platforms that do not support Winsock.
int getMinorVersion() const;
Returns the vendor-supplied minor version of the Winsock DLL. Returns 0 on platforms that do not support Winsock.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.