Switching from SOAP to Binary Remoting

Through the use of configuration files, we can also switch from SOAP encoding (the default one used by the .NET Framework) to the more efficient binary one.

In order to do this, we need to register the binary provider under the node "channels" in both configuration files.

The new server configuration file is shown in Listing 30.16.

Listing 30.16. Server Configuration File for Binary Encoding
1: <configuration> 2: <system.runtime.remoting> 3: <application> 4: <channels> 5: <channel ref="tcp" port="8231" /> 6: <channel ref="http" port="8099"> 7: <serverProviders> 8: <formatter ref="binary" /> 9: </serverProviders> 10: </channel> 11: </channels> 12: <service> 13: <wellknown type="SimpleServer_Factory.TSimpleFactory, ...

Get Delphi for .NET Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.