Search code examples
c#.netremotingconnection

.Net Remoting uses only one connection ?


Does .Net Remoting opens multiple connections or just one ? let say I have a server and a client. if the client creates multiple SingleCall objects. then for every object is there going to be a new connection or there going to be a single connection for every object ?

I can't find the answer anywhere.


Solution

  • The number of network connections depends on remoting channel you use. The default TcpChannel opens as many network connections as many threads in your program try to access the server during one point of time.

    For single-threaded applications, TcpChannel uses one network connection.

    As an opposite example, a third party remoting channel IiopChannel uses multiplexing and thus allows to have just a few network connections for many hundreds of active threads.