Skip to content

Instantly share code, notes, and snippets.

@noqisofon
Created November 17, 2010 04:17
Show Gist options
  • Save noqisofon/702966 to your computer and use it in GitHub Desktop.
Save noqisofon/702966 to your computer and use it in GitHub Desktop.
りもーとさーばー。
using std;
using runtime.remoting;
using runtime.remoting.channels;
using runtime.remoting.channels.ipc;
namespace sample.demo.remotingipc {
/**
* サーバー側。
*/
class RemoteServer {
static function main(args : string[]) {
// IPC チャンネルを作成します。
let server_channel : IPCServerChannel = new IPCServerChannel( "remote" );
// 作成したチャンネルを登録します。
ChannelServices.registerChannel( server_channel, true );
// リモートオブジェクトの型を登録します。
RemotingCongfiguration.registerWellKnownServiceType( typeof Counter,
"counter",
WellKnownObjectMode.Singleton
);
// チャンネルの URI を表示します。
console.printf( "listeng on %s", server_channel.getChannelUri() );
// Enter が押されるまで終了せずに待ちます。
console.readLine();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment