ヘルプ日本語訳/The Network Object/Description

Last-modified: 2010-12-29 (水) 03:07:48

ヘルプ日本語訳 > The objects > Inventory > The Network Object > Description

 

説明

※まだ実際試してません

 

ネットワークオブジェクトとは(原文ほぼ無視訳)
ローカルネットワーク内のPC間で行う通信方法のひとつ・メールスロットを利用して簡単簡易なネットワーク通信アプリケーションをMMF2で作成できます。
(通信手段にメールスロットを利用しているため、メールスロットの仕様や制限内でのやりとりとなります。)
二台のコンピューターで互いにチャンネルを開いて、あとはそのチャンネルに向けてデータ送信するだけでクライアント側は文字列や数値を受信できます。

 

○実際の使い方:通信チャンネルの開き方
任意のメールスロット名+共通のスロットナンバーの組み合わせで使用します。
とりあえず間違えてはいけないのがスロットナンバーを共通化するということ。
例えばメールスロット名は二台のコンピューターでそれぞれ「ご主人さま」と「メイド」としたら?
次にスロットナンバーはそれぞれ「0」と設定して、あとは通信チャンネルを互いにオープンします。
チャンネルをオープンしたら、互いが正しい相手にデータを送信してれば受信もできます。
例:受信した文字列の表示にテキストオブジェクトを使用したい場合
イベント>(ネットワーク):チャンネル0でメッセージが利用可能>文字列変更>Net String$( "ご主人さま", 0)

 

参考URL(日本語)mailslot
http://homepage2.nifty.com/c_lang/sdk3/sdk_250.htm
http://www7a.biglobe.ne.jp/~tsuneoka/win32sub/3.html
http://www.vbstation.net/spec/S4.htm

(原文)The Network Object

 

The Network object allows Multimedia Fusion 2 applications to communicate easily through a local network by opening a channel for communication between two computers. This allows two users to interact with each other through the applications such as is required for two-player games across the network or for monitoring one application from a remote station. Once the channel between the two computers is opened, the applications can send text or numerical data back and forth.

 

The network object communicates through the network using a facility called mail slots. For two computers to communicate using the mailslot, each machine must open a channel to the same mailslot number with a unique name assigned to each machine. For example, one machine would open slot 0 as "Host" and the other machine would open the same slot 0 but with the name "Guest." After the channel is open, text and numbers data are sent to the machine by addressing the data to the assigned name (Host) at that slot number (0).