Created
November 17, 2010 04:17
-
-
Save noqisofon/702966 to your computer and use it in GitHub Desktop.
りもーとさーばー。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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