Table of Contents

TTMSMCPHTTPServer Class

Server component that listens for requests and hands each one to a handler.

API unit family: TMS.MCP.HTTPServer Inherits from: TTMSMCPCustomHTTPServer

Syntax

TTMSMCPHTTPServer = class(TTMSMCPCustomHTTPServer)

Remarks

This is the component to use directly. It exposes the settings declared by TTMSMCPCustomHTTPServer: the port, whether connections are encrypted and whether the listener is open are published, while the address to bind to and the two request handlers are available at run time. Assign a handler before opening the listener, since requests arriving without one go unanswered. Handlers run on connection threads and several may run at once. The message channels build on this component rather than replacing it, so an application that only needs to serve the protocol should use one of those instead of wiring up request handling itself.

Properties

Name Description
Active Whether the listener is open. Setting it to True opens the port and starts accepting connections; setting it to False closes it. (inherited from TTMSMCPCustomHTTPServer)
BindingIP Address to listen on. Applied when the listener opens. (inherited from TTMSMCPCustomHTTPServer)
Port Port to listen on. Applied when the listener opens. (inherited from TTMSMCPCustomHTTPServer)
UseSSL Whether the listener serves encrypted connections: True serves over an encrypted channel, False serves in the clear. Applied when the listener opens. (inherited from TTMSMCPCustomHTTPServer)

Events

Name Description
OnCommandGet Handler called for retrieval requests. (inherited from TTMSMCPCustomHTTPServer)
OnCommandOther Handler called for requests that are not retrievals. (inherited from TTMSMCPCustomHTTPServer)

Used by