CoreRemoting and TcpServerChannel #29
Replies: 1 comment
-
Hello zharramadar, This code registers a TCP Remoting server channel (server channels are listening for incoming connections). The second parameter is a BinaryServerFormatterSinkProvider object. This ensures, that binary formatting is used for serialization. When using CoreRemoting this code would look like the following example:
This will create a CoreRemoting server listening at port 8080 for incoming calls. It will use WebSocket transport (WebSocketServerChannel). Class ServiceConnection is registered as service. In CoreRemoting interface and implemenatation type must be specified. To create a proxy on client side, we need an interface. CoreRemoting is not binary compatible to classic .NET Remoting. It is not possible to connect a CoreRemoting client to a .NET Remoting server or to connect a .NET Remoting client to a CoreRemoting server. If you need other transport than Websockets, you can implement IServerChannel, IClientChannel and IRawMessageTransport interfaces and plug in your custom transport channels using the Channel property on ServerConfig and ClientConfig. Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
Hi!
I am trying to convert a legacy DLL to .NET 6, CoreRemoting is the thing closest to match what I'm doing. I cannot change it to use any other remoting tech, I don't have access to the entire code to change everything.
The code I cannot fathom how to make work is :
IChannel channel = new TcpServerChannel(info, new BinaryServerFormatterSinkProvider()); ChannelServices.RegisterChannel(channel, ensureSecurity: false); RemotingConfiguration.RegisterWellKnownServiceType(typeof(ServiceConnection), "ServiceConnection", WellKnownObjectMode.Singleton);
I noticed you have a Websocket implementation in CoreRemoting, but there's no TcpServerChannel, but there are interfaces to implement.
How can I port this code to CodeRemoting?
Beta Was this translation helpful? Give feedback.
All reactions