TROIpSuperHttpServer

From RemObjects Software

Jump to: navigation, search

This is a RemObjects SDK Architecture entry
Feel free to add your notes to this topic below.



Overview

This Super HTTP Server implements the server side of the new and enhanced HTTP based channel which provides a sophisticated and flexible communication channel that uses persistent connections to enable true asynchronous calls and server callbacks.

The channel is based on the open source Synapse components that are available at http://synapse.ararat.cz.

File

  • uROIpSuperHttpServer

Declaration

TROIpSuperHttpServer = class(TROBaseSuperHttpServer)

Hierarchy

Properties

Property
Type
Description
Active Boolean Toggles whether the server ready to receive requests from clients. Depending on the server type, changing this property might open/close a network socket or otherwise toggle whether the server will process incoming requests.
BindV4 Boolean Allows to use IPv4
BindV6 Boolean Allows to use IPv6
DisableNagle Boolean Controls whether data packets are sent individually or if small packets are held back to send as part of fewer larger data packets.

Normally, you will want this disabled as it can have a significant effect on performance. The only time when its worth keeping the property enabled is when there are many small packets to be sent and you need to keep network bandwidth to a minimum.

Dispatchers TROMessageDispatchers Specifies how incoming requests will be processed and dispatched.

Depending on the server type, one or multiple dispatchers can be configured to receive messages from the client. Each dispatcher consists of a Message and an optional Name. Also, each dispatcher can be individually Enabled or disabled. Each server must have at least one dispatcher configured, in order to be able to process messages.

Essential Sub-Properties
  • Message specifies the message format to be used for this dispatcher.
  • Name specifies the name, or possibly the URL for the dispatcher.

In HTTP based servers (such as the TROIndyHTTPServer and TROBPDXHTTPServer), the Name will be appended as folder to the server URL allowing the server to make multiple dispatchers available at different URLs.

ConnectionTimeout Integer Specifies the timeout, in milliseconds, after which a connect will be aborted if no response has been received. The default value is 300 (0.3 second).

If you are expecting long processing times on your server, make sure to adjust this timeout accordingly.

Encryption TROEncryption Allows you to control encryption and compression settings on a per server/channel basis.
Essential Sub-Properties
  • EncryptionMethod: method to be used (default is tetNone, no encryption).
  • EncryptionSendKey: key to be used for encrypting outgoing messages.
  • EncryptionRecvKey : key to be used for decrypting incoming messages.
Note

Use of this property has been deprecated, and is only supported for Delphi/Win32; it is not available in Free Pascal, nor is it compatible with RemObjects SDK for .NET.

EventRepository TROEventRepository specifies event repository.
MaxPackageSize Integer Sets the maximum size of data package that the channel will transport (default is 1048576, 1MB).
Port Integer This is the network socket where the server will be listening (default for the RemObjects SDK Super HTTP servers is 8099).
ServeInfoPage Boolean Allows the HTTP server to serve up a page with human-readable information about the server when being accessed from a web browser.

This information page will contain details about the registered dispatchers and the documentation for the services.

ServerName String Used to return the name of the server to the client, this is used to denote that the server is ready to begin processing requests. The default is "RemObjects SDK Super IpHttp Server for Delphi".
ServeRodl Boolean Permits the HTTP server to make its RODL file available to clients (true, default) or not.

Keep this property set to true if clients need to access the RODL (or WSDL), e.g. so that third parties (including Service Tester) can import services. Set it to false if you do not want to provide this information, e.g. for security reasons.

ThreadPool TROThreadPool This property gives access to a thread pool.


Events

Event
Description
OnAfterServerActivate Fires after the server has been activated.
OnAfterServerDeactivate Fires after the server has been deactivated.

You can use this event handler to perform any cleanup you might need after the server has stopped processing new requests.

OnBeforeServerActivate Fires just before the server is activated.

You can use this event handler to perform any initialization you might need before the server starts processing new requests.

OnBeforeServerDeactivate Fires just before the server is deactivated.

You can use this event handler to perform any cleanup you might need before the server stops processing new requests.

OnManualBindSocket Allows to do thin setup.
OnReadFromStream Fires after a stream with a request message has been received from the client.

The event handler can inspect and possibly modify the stream, before it continues to be processed by the higher levels of the RemObjects SDK framework.

OnWriteToStream Fires just before a stream with a response message is sent back to the client.

The event handler can inspect and possibly modify the stream, before it continues to be sent off to the client.

OnUnknownRequest used for handling unknown requests


See Also


Product: RemObjects SDK
Current version: RemObjects SDK 'Vinci' (5.0)

ListsGlossaryFeaturesHow ToComponentsToolsSamplesArticlesArchitectureIssues

Personal tools