PowerTCP Server for ActiveX
from $499.00Available Platforms
Server for ActiveX
Add server-side functionality to your application with the suite of PowerTCP Server controls. PowerTCP Server for ActiveX is reliable, easy to use, and backed by the best technical support in the industry. Looking for a secure TCP or FTP server? Check out PowerTCP SSL for ActiveX.
Consulting and Custom Development
Server and TCP Components
- "Turn-key" solution internally accepts incoming connections
- Access any active connection from an easy to use collection
- Asynchronous events fire as a connection's status changes and as data is received
- Write mail and other command-response protocol servers
- Implement established- or custom-protocol servers
- Tcp control included for client-side applications
Specialized FTP and DNS Server Components
- Add FTP server functionality to your application, or write a fully-featured FTP server
- Customize authentication and file system management
- Add custom FTP command support
- Respond to Domain Name Server (DNS) queries using custom logic
- Name, dot address (reverse lookup) and MX record resolution
- Dns control included for client-side resolution
Service Component
- Transform your server application into a windows service
- Respond to all service events, including Start, Stop, Pause, Resume
- Receive messages from external applications
- Log event messages
- Convenient self-install and uninstall functions
Samples and Documentation
- Many sample projects, including VB6 and VC++
- Supports COM+ Component Services
- Wrapper classes included for convenient integration into Visual C++
- Can be used in a multi-threaded environment
- Context-sensitive Help with tutorials and a comprehensive reference guide
- Royalty-free license
Included with PowerTCP Server for ActiveX
- 16 Controls/Objects.
- 9 Full Sample projects.
- Debug Server for debugging and protocol testing.
- Full MS Help 1.3 Documentation, including examples.
- Free Introductory Support.
Component | Description |
---|---|
FtpServer Control | Use to build into your application a fully-functioning standalone or custom FTP server. |
Dns Control | Use to access Domain Name Servers. |
DnsServer Control | Use to respond to Domain Name Server requests. |
Server Control | Use the Server Control to quickly build custom server applications. |
Service Control | Use to make your application into an NT Service. |
TCP Control | Use the TCP Control to manage streams of data. |
Children Object | The Children Object provides a collection of TCP objects that have been dynamically created. |
DartStream Object | Use the DartStream Object to manage a streamed buffer to/from memory or a file. |
DnsRequest Object | The DnsRequest Object is used in the DnsServer Control events to provide access to request details found in the incoming (from the DNS client) datagram. |
FtpVariable Object | Use the FtpVariable Object to store and manage variables. |
FtpVariables Object | Collection of FtpVariable Objects |
Request Object | Use the Request Object to obtain information about the current request. |
Response Object | Use the Response Object to manage information sent back to the client. |
Session Object | Use the Session Object to manage information describing a client session. |
Sessions Object | Use the Sessions Object to manage multiple Session Objects. |
User Object | Use the User Object to obtain information about the current user and to indicate that a client has been authenticated. |
Supported Environments
Operating Systems*: Server 2008, 2012, Windows 7, Windows 8, Windows 10, Server 2016
PowerTCP Server for ActiveX can be used in the following development environments:
- Visual Basic
- Visual C++
- FoxPro
- ASP
- VBScript (wscript, cscript, etc)
- MS Office VBA
Visual Basic
Looking to create a server application using Visual Basic? PowerTCP Server for ActiveX contains 8 full sample projects for Visual Basic, demonstrating several different types of server applications.
Visual C++
PowerTCP Server for ActiveX includes C++ wrapper classes to make creating server applications in C++ even easier. In addition, an echo server sample project is included.
Code Examples
Included Sample Projects
These PowerTCP Server for ActiveX samples included with the installation are fully working applications with complete source code.Sample Name | Sample Description | Environments |
---|---|---|
Character Generator | Uses the Server and Service Controls to generate a continuous stream of characters. We use this for QA stress testing. | VB 6 |
Discard Server | Uses Server and Service Controls to receive any data stream. | VB 6 |
DNS Proxy | A program that could be used to intercept DNS requests and perform actions based on the request (in this case a simple log file) before supplying the response to the requestor. | VB 6 |
Echo Server | Uses the Server and Service Controls to echo back received data. | VB 6, VC++ 6 |
FTP Server | Uses the FtpServer and Service Controls to implement an FTP Server Service. | VB 6 |
Proxy Server | Demonstrates how to use PowerTCP to perform the functions of several of the most common proxy types. | VB 6 |
SMTP Server | Uses the Server and Service Controls to implement an SMTP (mail) server. | VB 6 |
Server for ActiveX also includes the following application(s):
Application | Description |
---|---|
Debug Server | This server application is based upon one of Dart's own internal testing tools and is designed to help developers debug their client-side applications by being able to see the message sent from a client application. Then, a developer can respond to the client application with a customized response message sent from the server. |
Product Release History for PowerTCP Server for ActiveX
The following is a list of public releases for all components shipped with PowerTCP Server for ActiveX (Latest Release 2013-05-17)
dartserver.dll
Current Version: 3.2.5.0
3.2.5.0 Released: 2013-05-17
Product fixes in this release:
- Resolved a Com registration error.
- Resolved an issue that could cause a crash when using the Server control as a proxy. (5695)
3.2.3.0 Released: 2012-07-10
- There are now separate "Trial" and "Licensed" versions of the dll. Trial dlls are not for deployment and will only function on machines on which a trial version of the product has been installed.
3.2.2.0 Released: 2012-02-09
- No changes from 3.2.1.0.
3.2.1.0 Released: 2011-01-25
- Number update to match product version.
3.2.0.0 Released: 2010-07-26
- No longer vulnerable to attacks outlined in Microsoft Security Bulletin MS09-035 (http://www.microsoft.com/technet/security/bulletin/MS09-035.mspx).
- Now functions on all Data Execution Protection (DEP) enabled systems.
dartdnsserver.dll
Current Version: 3.2.4.1
3.2.4.1 Released: 2013-05-17
Product fixes in this release:
- Blank DNS responses will no longer be included when resolving mail servers for a domain.
- Resolved a Com registration error.
3.2.3.0 Released: 2012-07-10
- There are now separate "Trial" and "Licensed" versions of the dll. Trial dlls are not for deployment and will only function on machines on which a trial version of the product has been installed.
3.2.1.0 Released: 2011-01-25
- Number update to match product version.
3.2.0.10 Released: 2010-07-26
- Now functions on all Data Execution Protection (DEP) enabled systems.
- No longer vulnerable to attacks outlined in Microsoft Security Bulletin MS09-035 (http://www.microsoft.com/technet/security/bulletin/MS09-035.mspx).
dartftpserver.dll
Current Version: 3.2.3.0
3.2.3.0 Released: 2012-07-10
- There are now separate "Trial" and "Licensed" versions of the dll. Trial dlls are not for deployment and will only function on machines on which a trial version of the product has been installed.
3.2.1.0 Released: 2011-01-25
Product fixes in this release:
- Fixed crash when transferring files.
3.2.0.1 Released: 2010-07-26
- No longer vulnerable to attacks outlined in Microsoft Security Bulletin MS09-035 (http://www.microsoft.com/technet/security/bulletin/MS09-035.mspx).
- Now functions on all Data Execution Protection (DEP) enabled systems.
dartftputil.dll
Current Version: 3.2.4.1
3.2.4.1 Released: 2013-05-17
Product fixes in this release:
- Resolved a Com registration error.
3.2.3.0 Released: 2012-07-10
- There are now separate "Trial" and "Licensed" versions of the dll. Trial dlls are not for deployment and will only function on machines on which a trial version of the product has been installed.
3.2.1.0 Released: 2011-01-25
- Number update to match product version.
3.2.0.0 Released: 2010-07-26
- Now functions on all Data Execution Protection (DEP) enabled systems.
- No longer vulnerable to attacks outlined in Microsoft Security Bulletin MS09-035 (http://www.microsoft.com/technet/security/bulletin/MS09-035.mspx).
dartservice.dll
Current Version: 3.2.5.1
3.2.5.1 Released: 2013-05-17
Product fixes in this release:
- Resolved a Com registration error.
- The Service control now functions correctly on 64-bit operating systems. (4764)
3.2.3.0 Released: 2012-07-10
- There are now separate "Trial" and "Licensed" versions of the dll. Trial dlls are not for deployment and will only function on machines on which a trial version of the product has been installed.
3.2.2.0 Released: 2012-02-09
- No changes from 3.2.1.0.
3.2.1.0 Released: 2011-01-25
- Number update to match product version.
3.2.0.0 Released: 2010-07-26
- Now functions on all Data Execution Protection (DEP) enabled systems.
- No longer vulnerable to attacks outlined in Microsoft Security Bulletin MS09-035 (http://www.microsoft.com/technet/security/bulletin/MS09-035.mspx).
dartsock.dll
Current Version: 2.10.2.1
2.10.2.1 Released: 2013-05-08
Product fixes in this release:
- Resolved a com registration error.
- Resolved an issue where DartStrings would be empty when reading and splitting a large file with delimiters. (5117)
- Resolved a memory leak when calling the Udp.Receive(DartStream) overload. (5536)
2.10.0.1 Released: 2012-07-10
- There are now separate "Trial" and "Licensed" versions of the dll. Trial dlls are not for deployment and will only function on machines on which a trial version of the product has been installed.
2.9.1.0 Released: 2012-02-09
- No changes from 2.9.0.3.
2.9.0.3 Released: 2010-10-26
- CertificateList and CertificateStore are now licensed controls in PowerTCP Mail for ActiveX.
2.9.0.2 Released: 2010-07-26
Product fixes in this release:
- Fixed problem getting DartStrings.All when the collection is empty.
2.9.0.1 Released: 2010-04-28
- Now functions on all Data Execution Protection (DEP) enabled systems.
- No longer vulnerable to attacks outlined in Microsoft Security Bulletin MS09-035 (http://www.microsoft.com/technet/security/bulletin/MS09-035.mspx).
2.9.0.0 Released: 2010-02-11
Product fixes in this release:
- The StartAfter parameter of DartStrings.Find can now be greater than 65535. (4707)
- Ras Phonebook entries can now have names with multibyte characters. (4875)
2.8.5.0 Released: 2008-03-19
Product fixes in this release:
- It is now possible to edit and add to Ras PhoneBooks on Vista machines. (4225)
- Two running instances of the same application using the Ping control are now completely independent. (4583)
2.8.3.27 Released: 2008-02-04
Product fixes in this release:
- DartStrings.Remove now works with a string parameter. (4262)
- NoDelay and KeepAlive properties can now be set to false on Vista machines. (4351)
- DartStrings.Add now works when adding strings to the end of the collection by specifying an index parameter. (4632)
dartutil.dll
Current Version: 2.9.3.0
2.9.3.0 Released: 2013-05-17
Product fixes in this release:
- Resolved a Com registration error.
2.9.2.0 Released: 2012-07-10
- There are now separate "Trial" and "Licensed" versions of the dll. Trial dlls are not for deployment and will only function on machines on which a trial version of the product has been installed.
2.9.1.0 Released: 2012-02-09
- No changes from 2.9.0.1.
2.9.0.1 Released: 2010-04-28
- Now functions on all Data Execution Protection (DEP) enabled systems.
- No longer vulnerable to attacks outlined in Microsoft Security Bulletin MS09-035 (http://www.microsoft.com/technet/security/bulletin/MS09-035.mspx).
2.8.5.0 Released: 2008-03-19
Product fixes in this release:
- Two running instances of the same application using the Ping control are now completely independent. (4583)
PowerTCP Server for ActiveX Features
FtpServer ActiveX Control
The FtpServer control is used to build custom FTP server applications. Features include:
- The FtpServer control uses an internal Daemon object and dynamically creates internal TCP objects as each passive connection is automatically accepted. Use this TCP object to send and receive data to that individual connection.
- When a request is received, a corresponding event is raised. Write your own custom handling code in the event handler.
- Add authentication and customized user directories within the Login event.
- Disallow changing directories within the ChangeDirectoryUp and ChangeWorkingDirectory events to those who do not have proper permissions.
- Disallow directory creation/deletion within the MakeDirectory and RemoveDirectory methods to those who do not have proper permissions
- Disallow file upload/download within the Retrieve and Store event to those who do not have proper permissions.
Development Environments
- Visual Studio .NET (.NET Framework)
- Visual Basic (VB)
- Visual C++ (VC++)
- FoxPro
- ASP
- Office 97/2000
Interface
Public Properties | |
Count | Number of nonsecure TCP connections currently open. |
EndEvent | Regulates whether the events will be raised only at the beginning of an operation, or both at the beginning and the end of an operation. |
LocalAddress | Returns the address in use while the Daemon is active and an empty string when the Daemon socket is closed. |
LocalPort | Returns the port number in use while the Daemon is active and 0 when the Daemon is closed. |
LogDirectory | Directory for daily log files. |
MaxIdleTime | Maximum time in minutes a session can be idle before it terminates. |
QuitMessage | Message sent to the client in response to a QUIT command (when the user logs out). |
RequestAccountInfo | Controls whether the ACCT command is requested. |
RestartAllowed | Indicates whether users can restart file transfers. |
Sessions | Collection of active Session Objects. |
Status | Text description of the server status. This is the message returned to the client in response to a STAT command. |
SystemName | System name and type. This is the message returned to the client in response to a SYST command. |
WelcomeMessage | Message returned to the client when the client initially connects. |
Public Methods | |
About | Show the About Box. |
Pause | Stop the server from listening and accepting new connections, while allowing established connections and sessions to persist. |
Start | Start processing FTP requests. |
Stop | Stop the server from accepting new connections and immediately close existing client connections. |
Public Events | |
Append | Fires when the client attempts to append to a file (by sending an APPE command). |
ChangeDirectoryUp | Fires when the client sends a CDUP command. |
ChangeWorkingDirectory | Fires when the client sends a CWD command. |
Command | Fires when the client sends a custom command. |
Delete | Fires when the client sends a DELE command. |
Error | Fires whenever an error condition occurs. |
Help | Fires when the client sends the HELP command. |
List | Fires when the client sends a LIST command. |
Login | Fires when the client attempts to log into the server. |
Logout | Fires when the client sends the QUIT command. |
MakeDirectory | Fires when the client sends a MKD command. |
NameList | Fires when the client sends a NLST command. |
RemoveDirectory | Fires when the client sends a RMD command. |
Rename | Fires when the client attempts to rename a file. |
Retrieve | Fires when the client attempts to retrieve a file. |
SessionEnd | Fires just before the session is terminated. |
SessionInit | Fires when the client first connects to the server. |
Site | Fires when the client sends the SITE command. |
Status | Fires when the client sends the STAT command. |
Store | Fires when the client attempts to store a file. |
StructureMount | Fires when the client sends the SMNT command. |
Code Example
How easy is the FtpServer ActiveX control to use? Check out the VB examples below, which demonstrates creating a fully-functional FTP Server application which performs user authentication.
Private Sub StartServer()
' Start the server listening on port 21 with the FTP root C:\FtpRoot
FtpServer1.Start "C:\FtpRoot"
End Sub
Private Sub FtpServer1_Login(ByVal Request As DartFtpServerCtl.IRequest,
ByVal Response As DartFtpServerCtl.IResponse)
' Perform your own username and password validation here. Currently
' for now simply hardcode to only allow username "joe" and password "schmoe".
If Request.Session.User.Name = "joe" And Request.Session.User.Password = "schmoe" Then
' Take no action. Let them log in.
Else
' Reject the login. This will cause a "530 Login incorrect" response.
Request.Session.User = Nothing
End If
End Sub
PowerTCP Server for ActiveX Features
Dns ActiveX Control
Use the Dns control to integrate domain name resolution into any COM application, allowing your application to easily resolve domain names, host addresses, and email addresses. Features include:
- The Dns control bypasses Winsock system services, so you can query ANY Domain Name Server on the Internet.
- Resolve a domain name to a dot address (forward lookup)
- Resolve a dot address to a domain name (reverse lookup)
- Resolve an email address to the mail server responsible for the mail server (mx lookup)
- The Dns control comes complete with extensive samples.
Development Environments
- Visual Studio .NET (.NET Framework)
- Visual Basic (VB)
- Visual C++ (VC++)
- FoxPro
- ASP
- Office 97/2000
Interface Members
Public Properties | |
Addresses | Collection of addresses in dot notation (nnn.nnn.nnn.nnn) returned by the Domain Name Server. |
Id | Sets the Dns request ID included with the request. |
Names | Collection of names returned by the Domain Name Server. |
ServerName | Domain Name Server to use for queries. |
ServerPort | Domain Name Server port for queries. |
Timeout | Controls the blocking behavior of methods that can be used in blocking and non-blocking ways. |
Public Methods | |
Abort | Abort any blocking method and release all system resources. |
About | Show the About Box. |
GetAddress | Resolve a host name to a dot address. |
GetMailServer | Get the mail server (or servers) responsible for receiving mail for a given email address. |
GetName | Resolve a dot address to a host name. |
Public Events | |
Error | Fires when an error condition occurs. |
Response | Fires after the Id, Addresses, and Names properties are updated with the contents of a DNS response. |
Code Example
How easy is the DNS ActiveX control to use? Check out the following VB example below, which demonstrates getting an IP address for a domain name.
' Specify the DNS server to use to resolve the request
Dns1.ServerName = "Dns1.nameserver.com"
' Get the IP address for a url
Dns1.GetAddress "dart.com"
' show the result to the user
MsgBox "Address of dart.com: " & Dns1.Addresses(1)
PowerTCP Server for ActiveX Features
DnsServer ActiveX Control
Use the DnsServer control to build a DNS server application which responds to DNS queries. Features include:
- When a request is received, a corresponding event is raised. Write your own custom handling code in the event handler.
- The GetAddress event is raised when a client requests a domian name be resolved to a dot address (forward lookup).
- The GetName event is raised when a client requests a dot address be resolved to a domain name (reverse lookup).
- The GetMailServer event is raised when a client requests an email address be resolved to the mail server responsible for that email address (mx lookup).
- Use with the Dns control to build a "proxy" DNS server (passing on requests to another DNS server), or resolve names using a local datasource.
Development Environments
- Visual Studio .NET (.NET Framework)
- Visual Basic (VB)
- Visual C++ (VC++)
- FoxPro
- ASP
- Office 97/2000
Interface
Public Properties | |
ClientException | ClientException is used only in the GetAddress, GetName, and GetMailServer events. After the event is fired, the DnsServer Control will expect this property to be set if you wish to return an error condition to the client. The default value is dnsOk. |
LocalAddress | Returns the address in use while the socket is active and an empty string when the UDP socket is closed. |
LocalPort | Returns the port number in use while the socket is active and 0 when the socket is closed. When the Protocol property of the UDP Control is not ptUdp, LocalPort returns 0. |
Timeout | Controls the blocking behavior of methods that can be used in blocking and non-blocking ways. |
Public Methods | |
Abort | Abort any blocking method and release all system resources. |
About | Show the About Box. |
Close | Release system resources. |
Open | Allocate a socket for sending and receiving datagrams. |
Trace | Start or stop the accumulation of trace or debug data. Once started, this method accumulates data until it is turned off. |
Public Events | |
Error | Fires when an error condition occurs. |
GetAddress | Fires when a DNS type A request has been received. |
GetMailServer | Fires when a DNS type MX request has been received. |
GetName | Fires when a DNS type PTR request has been received. |
Code Example
How easy is the DnsServer control to use? Check out the VB examples below, which demonstrates responding to a request to resolve an address.
' Don't forget to add a reference to Microsoft Scripting Runtime.
Dim LookupTable As New Dictionary
Private Sub StartServer()
' Start the server
DnsServer1.Open
' Initialize the "phony" lookup table (replace this with a real data source)
LookupTable.Add "127.0.0.1", "localhost"
LookupTable.Add "111.222.111.222", "myserver.com"
LookupTable.Add "209.61.190.88", "dart.com"
End Sub
Private Sub DnsServer1_GetName(ByVal Address As String, ByVal Names As
DartDnsServerCtl.IDartStrings, OwnerName As String, ByVal Request As
DartDnsServerCtl.IDnsRequest)
' Check if they are requesting a recursive search or a local search. This example
only handles local
' searches, so send an exception if it is recursive.
If Not Cbool(Request.RecursiveFlag) Then
' Look up the name
Dim Name As String
Name = MyGetHostName(Address)
' See if a valid name was found.
If Name <> "" Then
' Add the name to the response
Names.Add (Name)
' The owner is the local server.
OwnerName = DnsServer1.LocalAddress
Else
' Name not found. Return a not found exception.
DnsServer1.ClientException = dnsNameError
End If
Else
' Uh oh, this server does local lookups only
DnsServer1.ClientException = dnsNotImplemented
End If
End Sub
Private Function MyGetHostName(ByVal Name As String)
' Use the LookupTable to get the name from the IP.
If LookupTable.Exists(Address) Then
MyGetHostName = LookupTable.Item(Address)
Else
MyGetHostName = ""
End If
End Function
PowerTCP Server for ActiveX Features
(Tcp) Server ActiveX Control
Use the Server control to build any type of high-level TCP server application (such as FTP, HTTP, POP3, SMTP, or your own proprietary protocol). Features include:
- The Server control uses an internal Daemon (listener) object and dynamically creates internal TCP objects as each passive connection is automatically accepted. Use this TCP object to send and receive data to that individual connection.
- Active connections are available in a collection.
- Events are raised notifying when a new connection occurs or an existing connection closes.
- Create a server which implements an existing protocol such as an FTP, POP, IMAP, or HTTP server.
- Create a server which implements your own custom protocol.
Development Environments
- Visual Studio .NET (.NET Framework)
- Visual Basic (VB)
- VBScript
- Visual C++ (VC++)
- FoxPro
- PowerBuilder
- Delphi
- C++ Builder
- ASP
- Office 97/2000
Interface
Public Properties | |
Children | Returns a collection of TCP child connections accepted by the server. |
LocalAddress | Returns the address in use while the Daemon is active and an empty string when the Daemon socket is closed. |
LocalPort | Returns the port number in use while the Daemon is active and 0 when the Daemon is closed. |
ReuseAddress | When True, the REUSEADDR socket option is set to accept duplicate use of the same LocalAddress / LocalPort pair. |
Public Methods | |
About | Show the About Box. |
Close | Stop the server from accepting new connections and immediately close existing client connections. |
Listen | Start listening for passive connections. |
Public Events | |
Count | Fires to indicate the count of connected children has changed. |
Error | Fires when an error condition occurs. |
Receive | Fires when the ReceiveBufferCount changes. |
Send | Fires when the system accepts data for sending. |
State | Fires when the State property changes. |
Code Example
How easy is the Server ActiveX control to use? Check out the VB example below, which demonstrates creating a functional echo server.
Private Sub StartServer()
' Start the server on port 7 (the well-known port for echo)
Server1.Listen 7
End Sub
Private Sub Server1_Receive(ByVal Child As DartServerCtl.ITcp)
' Buffercount changed. Receive data from a connected client.
Dim Data As String
Dim ByteCount As Long
ByteCount = Child.Receive(Data)
' Now echo the data back.
Child.Send (Data)
End Sub
PowerTCP Server for ActiveX Features
(Windows) Service ActiveX Control
The NT Service control is used to turn any application into a Windows Service. Features include:
- Easily turn any server applications built using PowerTCP products into services.
- Applications built with the Service Control target server-side applications that always run in the background, even when a user is not logged into the system.
- With the Service Control, you can respond to all service events, including Start, Stop, Pause, and Resume. The Message event is included to support user messages sent from external applications. The Log method is included for logging event messages.
- Convenient Install and Uninstall methods provide a way for your application to install and uninstall itself as a service. The Abort method allows your service to abort and stop itself while running.
Interface
Public Properties | |
Params | Contains the parameters passed to your service. This property may be read when the State property is serviceRunning. |
State | Determine what state the service is in. The State event fires to signal that this property has changed. |
Public Methods | |
Abort | Abort and stop a running service. |
About | Show the About Box. |
Connect | Connect the service to the operating system’s Service Control Manager (SCM). Call this method as soon as possible after your application starts. |
Install | Install the application as a service. |
Log | Enter an event in the Windows Event Log. |
Uninstall | Uninstall a service. |
Public Events | |
Error | Fires when an error occurs. This event fires before the error is reported back to the container's error object. |
Message | Fires when an application sends the service a user message. This can be used any way you wish, as it has no special meaning to the operating system. |
State | Fires to indicate the State property has changed value. |
Code Example
How easy is the Service control to use? Check out the following Service VB example below, which demonstrates creating an echo service with the Server control.
Private Sub Form_Load()
On Error GoTo OnError ' use intrinsic error handling
'Connect to the Service Control Manager
Service1.Connect
Exit Sub
OnError: ' Any error jumps here
Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description
End Sub
Private Sub Service1_State()
On Error GoTo OnError ' use intrinsic error handling
Dim I As Integer
Select Case Service1.State
Case serviceRunning
' service is now running, beep to the world!
Beep
' Start the Echo Server
Server1.Listen 7
Case servicePaused
' service is now going to sleep, stop listening for new connections
Server1.Close
Case serviceResumed
' service is now waking up from sleep, resume listening!
Server1.Listen 7
Case serviceStopped
' service is now stopping, log a message to Windows event log
Service1.Log serviceInformation, serviceInfoEvent, “Stopping”
' stop listening for new connections
Server1.Close
' shut down all active connections
For I = 1 To Server1.Children.Count
Server1.Children(I).Close
Next
End Select
Exit Sub
OnError: ' Any error jumps here
Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description
End Sub
PowerTCP Server for ActiveX Features
(Tcp) Server ActiveX Control
Use the Server control to build any type of high-level TCP server application (such as FTP, HTTP, POP3, SMTP, or your own proprietary protocol). Features include:
- The Server control uses an internal Daemon (listener) object and dynamically creates internal TCP objects as each passive connection is automatically accepted. Use this TCP object to send and receive data to that individual connection.
- Active connections are available in a collection.
- Events are raised notifying when a new connection occurs or an existing connection closes.
- Create a server which implements an existing protocol such as an FTP, POP, IMAP, or HTTP server.
- Create a server which implements your own custom protocol.
Development Environments
- Visual Studio .NET (.NET Framework)
- Visual Basic (VB)
- VBScript
- Visual C++ (VC++)
- FoxPro
- PowerBuilder
- Delphi
- C++ Builder
- ASP
- Office 97/2000
Interface
Public Properties | |
Children | Returns a collection of TCP child connections accepted by the server. |
LocalAddress | Returns the address in use while the Daemon is active and an empty string when the Daemon socket is closed. |
LocalPort | Returns the port number in use while the Daemon is active and 0 when the Daemon is closed. |
ReuseAddress | When True, the REUSEADDR socket option is set to accept duplicate use of the same LocalAddress / LocalPort pair. |
Public Methods | |
About | Show the About Box. |
Close | Stop the server from accepting new connections and immediately close existing client connections. |
Listen | Start listening for passive connections. |
Public Events | |
Count | Fires to indicate the count of connected children has changed. |
Error | Fires when an error condition occurs. |
Receive | Fires when the ReceiveBufferCount changes. |
Send | Fires when the system accepts data for sending. |
State | Fires when the State property changes. |
Code Example
How easy is the Server ActiveX control to use? Check out the VB example below, which demonstrates creating a functional echo server.
Private Sub StartServer()
' Start the server on port 7 (the well-known port for echo)
Server1.Listen 7
End Sub
Private Sub Server1_Receive(ByVal Child As DartServerCtl.ITcp)
' Buffercount changed. Receive data from a connected client.
Dim Data As String
Dim ByteCount As Long
ByteCount = Child.Receive(Data)
' Now echo the data back.
Child.Send (Data)
End Sub
PowerTCP Server for ActiveX Features
(Windows) Service ActiveX Control
The NT Service control is used to turn any application into a Windows Service. Features include:
- Easily turn any server applications built using PowerTCP products into services.
- Applications built with the Service Control target server-side applications that always run in the background, even when a user is not logged into the system.
- With the Service Control, you can respond to all service events, including Start, Stop, Pause, and Resume. The Message event is included to support user messages sent from external applications. The Log method is included for logging event messages.
- Convenient Install and Uninstall methods provide a way for your application to install and uninstall itself as a service. The Abort method allows your service to abort and stop itself while running.
Interface
Public Properties | |
Params | Contains the parameters passed to your service. This property may be read when the State property is serviceRunning. |
State | Determine what state the service is in. The State event fires to signal that this property has changed. |
Public Methods | |
Abort | Abort and stop a running service. |
About | Show the About Box. |
Connect | Connect the service to the operating system’s Service Control Manager (SCM). Call this method as soon as possible after your application starts. |
Install | Install the application as a service. |
Log | Enter an event in the Windows Event Log. |
Uninstall | Uninstall a service. |
Public Events | |
Error | Fires when an error occurs. This event fires before the error is reported back to the container's error object. |
Message | Fires when an application sends the service a user message. This can be used any way you wish, as it has no special meaning to the operating system. |
State | Fires to indicate the State property has changed value. |
Code Example
How easy is the Service control to use? Check out the following Service VB example below, which demonstrates creating an echo service with the Server control.
Private Sub Form_Load()
On Error GoTo OnError ' use intrinsic error handling
'Connect to the Service Control Manager
Service1.Connect
Exit Sub
OnError: ' Any error jumps here
Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description
End Sub
Private Sub Service1_State()
On Error GoTo OnError ' use intrinsic error handling
Dim I As Integer
Select Case Service1.State
Case serviceRunning
' service is now running, beep to the world!
Beep
' Start the Echo Server
Server1.Listen 7
Case servicePaused
' service is now going to sleep, stop listening for new connections
Server1.Close
Case serviceResumed
' service is now waking up from sleep, resume listening!
Server1.Listen 7
Case serviceStopped
' service is now stopping, log a message to Windows event log
Service1.Log serviceInformation, serviceInfoEvent, “Stopping”
' stop listening for new connections
Server1.Close
' shut down all active connections
For I = 1 To Server1.Children.Count
Server1.Children(I).Close
Next
End Select
Exit Sub
OnError: ' Any error jumps here
Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description
End Sub
Purchase Options
Customize your product and support options match your needs. Discounts are applied when products are purchased in multiples or within available product suites.
Have any questions about purchasing? See our Sales FAQ