The TCP Server Object - HTML2EXE Programming Interface

Document Path: Home Page / Programming / HTML2EXE / Interfaces / TCP Server Object  
Introduction

For each connection accepted, TCP Server keeps a copy of the TCP Client object. You should call one of 'RemoveXXXX' method when a TCP client object is no long needed and can be released.

Properties Client ClientsCount Name Property
Methods Close DoRoutine Listen RemoveAllClients RemoveClient RemoveDisconnectedClients
Properties

Client

Value TCP Client Object
Arguments:
  • ULONG index
Access Get
Notes Retrieve a connection

ClientsCount

Value ULONG
Access Get
Notes

Name

Value BSTR
Access Get
Notes name of the object

Property

Value VARIANT
Arguments:
  • BSTR name
Access Get, Put
Notes for storing run-time variables
Methods

Close

Return Value
Notes Close the server and release connection TCP Client object

Listen

Return Value long
Arguments:
  • address
  • Object callBackFuncs
  • unsigned short backlog (Optional, default(5))
Notes
  • callBackFuncs can be a function or a script module
  • The callback function must be defined as:
    function OnConnectionAccepted(tcpServerObj, tcpClientObject)
    {
    }
    

RemoveAllClients

Return Value
Notes

RemoveClient

Return Value
Arguments:
Notes Close the connection and release TCP Client object

RemoveDisconnectedClients

Return Value
Notes