.NET RemotingȤϡ.NET Remoting = UNIXǸǡפǤ륽å̿ǥǡ 饤ȤΥ᥽åɡץѥƥƤӽФФơ³ǤԤäƤ褦Ǥ WEBФȥ֥饦δط褦̿򳫻ϤΤϾ.NET Remoting饤ȤǤꎤ ̾磻٥ȤʤɤΤ褦˥¦̿򳫻ϤǤޤ󡣤ǽˤˡʲΥڡ˽񤤤Ƥޤ

񤫤ƤƤưΤǤɤäʤΤǎʤβ.NET Remotingδμ뤳ȤȤޤ

С饤ȶ

¦Τ

饤ȤΤ

  1. ̾.NET RemotingˡǥФ³롣HttpChannelѤ(TcpChannelξSerializeԤ)
  2. C#
    ChannelServices.RegisterChannel(new HttpChannel());
    remoteserver = (RemotingServer)Activator.GetObject
      (typeof(RemotingServer), "http://192.168.0.1:12345/RemotingServer");
    
  3. С̿뤿ᎤHTTPͥ򳫤RemotingConfiguration.RegisterWellKnownServiceType()ס
  4. C#
    ChannelService.RegisterChannel(new HttpChannel(port));
    
  5. ̤ΤȤ֥ǡϤ򤹤륯饹פΥ󥹥󥹤롣
  6. C#
    receiver = new RemotingClientReceiver();
    
  7. Υ󥹥󥹤ΥǡϤ᥽åɤ򡢥Сdelegate˥åȤ롣
  8. C#
    remoteserver.delServerToClient = receiver.ReceiveFromServer;
    

С

  1. ̾.NET Remotingˡǥͥ򳫤饤Ȥ³Ԥġ
  2. 饤Ȥ³厤ФdelServerToClient˥饤ȤΥ֥ȤReceiveFromServer()򥻥åȤƤ롣
  3. 饤Ȥ˥ǡꤿʤЎ̤ʬ饹˰Ϥǡ򥻥åȤƎdelServerClient()ƤӽФȡ饤¦б᥽åɤ¹Ԥ쎤ΰȤƥǡϤ뤳Ȥˤʤ롣
  4. C#
    delServerToClient(new RemoteArg(12345));
    

ñ

Ƥ䥽ɤ򸫤ȎʣʤȤäƤ褦˸ޤ פϥ饤ȤMarshalByRefObject֥饹Υ᥽åɤdelegateȤƥСϤƤȎ С¦ǤdelegateѤȤˎ饤ȤΥ᥽åɤƤФ뤿Ꭴ ˾褸ưηǥǡϤȤȤǤ

ñ˥С̿򳫻Ϥʤ鎤饤ȤIPɥ쥹ݡȤʤɤäƤ餤С饤Ȥε³äƤޤˡ⤢ޤˤäƤϤǤ礦 delegateϤˡώޥϰа³ϰ¿ξǤ³ˡ³˥ݡȤURIѹʤФʤʤᎤѻˤʤޤ

2007/2/17