The SocketWrench ActiveX control provides general-purpose
networking functionality for building TCP and UDP clients and servers
over the Internet or a local network. It simplifies common Windows Sockets
operations while allowing applications to control their own connections
and data exchanges. Support for IPv4 and IPv6 makes it suitable for
implementing custom protocols and other applications that require
direct access to network communication.
Applications can establish connections, listen for incoming
requests, exchange data and manage socket options using blocking
operations or asynchronous connections with event notification.
Configurable timeouts and support for canceling blocking operations
provide control over how long an application waits for network
activity.
SocketWrench supports TLS 1.2 and TLS 1.3 for secure client and
server connections without requiring third-party encryption libraries.
Applications can establish secure connections from the outset or
upgrade an existing connection to TLS when required by the protocol.
Security features also provide access to connection credentials and
information about the security characteristics of an established
session.
Higher-level network I/O methods simplifies common protocol tasks,
including line-oriented exchanges and transferring streams of data
using memory buffers or files. Stream transfers can provide progress
notifications and transfer information, and received data can be
stored directly in a file. Stream read and write operations are
blocking and are best suited for synchronous connections running on
worker threads.
Utility methods provide information beyond the local and remote
addresses associated with a socket. Applications can determine
public-facing IPv4 and IPv6 addresses, including addresses used
through NAT routers or VPN connections, and obtain information about
active network adapters. VPN detection is intended as a best-effort
diagnostic aid and may not identify every VPN configuration.
Additional functionality is available for enumerating local network
addresses, retrieving adapter IP and MAC addresses, and determining
whether an IP address is routable over the Internet. Operations that
determine a public-facing address require access to external Internet
services and may fail when that access is restricted.
The control provides DNS host name resolution, address
formatting and comparison, and service name and port lookups. Host
names can be normalized and internationalized domain names converted
between Unicode and ASCII-compatible representations. Applications can
also validate host names, use alternate host tables, extract host and
port information from URLs, and establish connections using URLs.
Diagnostic and tracing features help applications identify and
report network problems during development and support. Network
operations, return values and errors can be traced with optional data
dumps, while additional diagnostic information is available for
errors, connection status, memory usage and stream transfers. These
facilities provide greater visibility into network activity without
requiring applications to implement their own diagnostic
infrastructure.
Although this control can be used to create a TCP/IP server,
the InternetServer control provides a simpler interface and
is designed specifically for embedding a custom server in an
application.
The SocketWrench control is self-registering and compatible
with any programming language that supports the Component Object
Model (COM) and the ActiveX control specification. If you are using
Visual Basic 6.0, Service Pack 6 (SP6) is required. We recommend
installing all available updates for your development tools. Although
the Visual Basic 6.0 runtime is supported on Windows 11, the IDE
itself is no longer officially supported by Microsoft. Legacy IDEs
and compilers may also require elevated (administrator) privileges
to run properly.
The control is supported on Windows 7, Windows Server 2008 R2,
and later versions of both desktop and server editions of Windows.
For Windows 7, Service Pack 1 (SP1) is the minimum requirement. For
Windows 8 systems, the 8.1 update must be installed. On ARM-based
platforms, the minimum supported version is Windows 10 build 1709.
SocketWrench includes components for both 32-bit (x86) and 64-bit
(x64) Windows platforms. All modern versions of Windows are 64-bit,
but we continue to include 32-bit components for compatibility with
legacy development tools such as Visual Basic 6.0. We also provide
native ARM64 ActiveX controls for systems running Windows on ARM. Note
that 32-bit applications on ARM run using x86 emulation, and Microsoft
no longer supports native ARM32 applications.
If you are using VBScript, Visual Basic for Applications (VBA), or
another scripting environment on an ARM-based system, be aware that
64-bit hosts will require ARM64 components, while 32-bit hosts will
use x86 components under emulation. This includes applications created
with Visual Basic 6.0. To reduce deployment complexity and avoid
confusion, SocketWrench does not include ARM32 ActiveX controls in its
standard redistribution packages but they are available on request for
legacy or specialized scenarios.
When distributing an application which uses this control, you can
either install the OCX file as a shared component in the appropriate
system folder or in the same folder as your application executable. If
the control is installed in a shared system location, the installer
should manage it as a shared component to prevent other applications
from being affected when it is updated or removed. If you install the
control in the same folder as your executable, it is recommended that
you use registration-free activation or COM redirection to ensure that
the correct version of the control is loaded by the application.
This control has no external runtime dependencies beyond the
standard Windows system libraries. It does not require the Microsoft
Visual C++ Redistributable or any additional third-party libraries to
be installed. All required components are either provided by Windows
or statically linked into the ActiveX control, simplifying deployment
and eliminating the need to distribute additional runtime files.