TcpChannel #218
Replies: 3 comments
-
|
Yes, CoreRemoting has a built-it TCP channel. CoreRemoting has not an exact ChannelServices class, because it is not a full .NET Remoting clone. What features of the classic .NET Remoting ChannelServices class do you need? Please have also a look at the .NET Remoting to CoreRemoting migration guide. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for your reply. The application I am working with currently uses
ChannelServices class to register and unregister tcp channels using
RegisterChannel method.
I have old remoting code which works by declaring a tcp channel and
registering it with the above method but the tcpchannel class no longer
exists.
…On Wed, Jan 14, 2026 at 8:48 PM Hagen Siegel ***@***.***> wrote:
Yes, CoreRemoting has a built-it TCP channel.
CoreRemoting has not an exact ChannelServices class, because it is not a
full .NET Remoting clone.
It is a modern RPC library that was built to have a modern replacement for
.NET Remoting.
A painless as possible migration path for large existing .NET Remoting
applications was an important goal from the beginning.
What features of the classic .NET Remoting ChannelServices class do you
need?
I'm sure, that most features can be mapped to CoreRemoting.
Please have also a look at the .NET Remoting to CoreRemoting migration
guide
<https://github.com/theRainbird/CoreRemoting/blob/master/docs/Migrate-NetRemoting-Application.md>
.
—
Reply to this email directly, view it on GitHub
<#218 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOZTTAOYPOGEVU23CTDYSI34G2TTHAVCNFSM6AAAAACRUZIUSSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKNBZHE4TGMY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
|
In CoreRemoting you can use Example (classic style): // Server configuration
var serverConfig = new ServerConfig()
{
HostName = "localhost",
NetworkPort = 9090,
Channel = new TcpServerChannel(), // <--- Set preferred channel here
Serializer = new NeoBinarySerializerAdapter(), // <-- Set serializer adapter of the preferred serializer here
MessageEncryption = true,
UniqueServerInstanceName = "MyTcpServer", // <-- Set unique name of the server (important if multiple instances are needed)
IsDefault = true // <-- When marked as default, this server is used if not explicitly specified
};
// Registers the server with the given configuration
RemotingConfiguration.RegisterServer(serverConfig);
// Register services
RemotingConfiguration.RegisterWellKnownServiceType(
interfaceType: typeof(ICalculatorService),
implementationType: typeof(CalculatorService),
lifetime: ServiceLifetime.Singleton,
serviceName: "CalculatorService",
uniqueServerInstanceName: "MyTcpServer"); // <-- Set the instance name of the server that should host this service (if not specified the default server is used
// Gets the Server instance
var server = RemotingConfiguration.GetRegisteredServer("MyTcpServer");
// Start the server instance (after this, the TcpChannel will start listening for requests)
server.Start();Example (modern style): // Create and configure the server
using var server =
new RemotingServer(new ServerConfig()
{
HostName = "localhost",
NetworkPort = 9090,
Channel = new TcpServerChannel(), // <--- Set preferred channel here
Serializer = new NeoBinarySerializerAdapter(), // <-- Set serializer adapter of the preferred serializer here
RegisterServicesAction = container =>
{
// Register services to be hosted
container.RegisterService<ICalculatorService, CalculatorService>(ServiceLifetime.Singleton);
}
});
// Start the server
server.Start(); |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm seeking to migrate a legacy app to modern frameworks. I would like to know if CoreRemoting has a replacement for remoting.channels.tcp.tcpchannel and also remoting.channels.channelservices
Many thanks for your time and this wonderful repo.
Beta Was this translation helpful? Give feedback.
All reactions