Mercurial > hg > FederatedLinda
view src/fdl/old/test/transfer/TestSend.java @ 114:3b877c9a44f5
gather old packages
author | kazz |
---|---|
date | Mon, 11 Oct 2010 14:29:37 +0900 |
parents | src/fdl/test/transfer/TestSend.java@e457d6c8907a |
children |
line wrap: on
line source
package fdl.old.test.transfer; 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(); System.out.println("Send Data"); }catch (IOException e) { System.out.println("例外:" + e); } } }