What is the major use of MarshalByRefObject?

后端 未结 4 973
野性不改
野性不改 2020-12-07 13:13

What\'s the purpose for MarshalByRefObject?

4条回答
  •  Happy的楠姐
    2020-12-07 13:34

    Remoting; it means that between AppDomains or machines, rather than serialize and transfer the object, the object stays at one end and a proxy is created at the other. All method calls to the proxy are intercepted and the call is transmitted as RPC wiki, msdn, causing the method to execute on the other machine (typically serialising the arguments and return value).

    Note: this can lead to unexpectedly "chatty" interfaces. The object/proxy/RPC approach is now less preferable to approaches with an explicit service boundary; Microsoft now recommends WCF wiki, msdn instead of remoting.

提交回复
热议问题