# HG changeset patch # User kono # Date 1219904694 -32400 # Node ID 4cfed12aa3aae2ba1a06f66a62d6a7f998646ebf # Parent 2ce1a378da8542deb2b74cc1a407fad533518d6a *** empty log message *** diff -r 2ce1a378da85 -r 4cfed12aa3aa rep/channel/ChannelSimulator.java --- a/rep/channel/ChannelSimulator.java Thu Aug 28 15:05:25 2008 +0900 +++ b/rep/channel/ChannelSimulator.java Thu Aug 28 15:24:54 2008 +0900 @@ -1,6 +1,7 @@ package rep.channel; import java.io.IOException; +import java.net.SocketAddress; import java.nio.channels.ClosedChannelException; import java.nio.channels.SelectableChannel; import java.nio.channels.SelectionKey; @@ -38,6 +39,11 @@ public boolean connect(int ip){ return ns.connect(ip, this); } + + public boolean connect(SocketAddress semaIP) throws IOException { + int ip = ns.nslookup(semaIP); + return ns.connect(ip, this); + } public ChannelSimulator
accept(){
return null;
diff -r 2ce1a378da85 -r 4cfed12aa3aa rep/channel/REPSocketChannel.java
--- a/rep/channel/REPSocketChannel.java Thu Aug 28 15:05:25 2008 +0900
+++ b/rep/channel/REPSocketChannel.java Thu Aug 28 15:24:54 2008 +0900
@@ -2,6 +2,7 @@
import java.io.IOException;
import java.net.Socket;
+import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.SelectableChannel;
@@ -116,6 +117,10 @@
return new REPSocketChannel