Mercurial > hg > FederatedLinda
diff src/fdl/test/metaTransfer/TestSend.java @ 52:00d2203fac80
MetaProtocolEngine still
author | axmo |
---|---|
date | Fri, 09 Jan 2009 16:09:08 +0900 |
parents | |
children | 629b6cfbd37f |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/fdl/test/metaTransfer/TestSend.java Fri Jan 09 16:09:08 2009 +0900 @@ -0,0 +1,33 @@ +package fdl.test.metaTransfer; + +import java.io.IOException; +import java.nio.ByteBuffer; + +import fdl.FederatedLinda; +import fdl.PSXLinda; + +public class TestSend extends Thread { + PSXLinda psxsend; + FederatedLinda fdlsend; + + public void run(){ + int id = 10; + int port = 10001; + String host = "127.0.0.1"; + ByteBuffer send = ByteBuffer.allocate(1024); + send.putInt(12); + send.flip(); + fdlsend = FederatedLinda.init(); + try{ + psxsend = fdlsend.open(host,port); + System.out.println("Connect Host1"); + psxsend.out(id, send); + fdlsend.sync(1); + System.out.println("Send Data"); + }catch (IOException e) { + System.out.println("例外:" + e); + } + + } + +}