Mercurial > hg > FederatedLinda
view 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 source
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); } } }