InternetServer ActiveX Control  
 

Embed a server in your application using the Transmission Control Protocol (TCP). The control automatically handles multiple simultaneous client requests and supports secure connections using TLS 1.2 or later. It can be used to implement your own custom application protocol and monitor the client sessions which interact with the server.

Reference

Control Information

Object Name InternetServerCtl.InternetServer
File Name CSWSVX12.OCX
Version 12.0.3041.1380
ProgID SocketTools.InternetServer.12
ClassID C1F0B98E-583F-45B3-9BA9-A8D6F45103DF
Threading Model Apartment
Help File CSW12HLP.CHM
Dependencies None
Standards RFC 768, RFC 791, RFC 793

Overview

The InternetServer ActiveX control provides a simplified interface for creating event-driven server applications using TCP/IP. The control interface is similar to the SocketWrench ActiveX control, however it is designed specifically to make it easier to implement a server application without requiring the need to manage multiple socket controls.

Each instance of the control represents a server, and each active client connection is managed internally and referenced by a number which uniquely identifies the client session. All interaction with the server and the clients connected to it uses an event-driven model, with the program written to respond to events such as OnConnect, OnRead and OnWrite.

The control supports both implicit and explicit TLS connections. With implicit TLS, the server begins negotiating a secure connection immediately after the client connects, presenting its certificate as part of the TLS handshake. With explicit TLS, the client initially establishes an unencrypted connection and subsequently requests that the connection be upgraded to TLS. Once the negotiation is complete, all subsequent communication is encrypted. Both methods require the server to be configured with a security certificate and its associated private key. Certificates are typically obtained from the Windows certificate store or loaded from a PKCS#12 (PFX) file.

Server management methods allow the application to start, stop, restart, suspend, and resume the service. You can also enumerate active clients, inspect session addresses and identities, adjust idle timeouts, and disconnect individual clients. Throttling can be used to limit active connections, connections from a single address, and the rate of incoming connections. Transfer information and server memory usage properties provide additional visibility into activity and resource use.

This control uses an apartment threading model. Although the server creates worker threads internally to manage client sessions and network operations, events are not raised directly from those worker threads. Instead, the control marshals event notifications back to its hosting thread using the Windows message mechanism, so application event handlers execute in the context of the thread that created the control. This design simplifies event handling for applications that host the control, particularly those based on a single-threaded event model such as Visual Basic 6.0.

The control is best suited for applications serving a modest number of concurrent clients. Event processing depends on the hosting thread continuing to dispatch Windows messages, and lengthy processing within an event handler can delay the handling of events generated by other client sessions. Applications that require high levels of concurrency or perform significant processing in response to server events may be better served by a development environment that offers greater control over threading and asynchronous event processing.

Developers who have used the SocketWrench control will find the InternetServer control has a familiar interface, with a subset of properties and methods that are specific to creating a server application. Each of the network events have an extra parameter which specifies the socket handle which should be used when communicating with the client. This enables the application to communicate with multiple clients without having to create multiple socket objects or use a control array.

Requirements

The SocketTools ActiveX Edition components are self-registering controls that are 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 ActiveX controls are 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.

SocketTools 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, SocketTools does not include ARM32 ActiveX controls in its standard redistribution packages but they are available on request for legacy or specialized scenarios.

Distribution

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.