- * Create a new method interface client. On successful construction the \r
- * connection is established over TCP/IP channel.\r
+ * Create a new method interface client. On successful construction the
+ * connection is established over TCP/IP channel.
+ *
+ * @param sa
+ * @throws IOException connection error
+ * @throws SerializationException handshake communication error
+ * @throws BindingException handshake communication error
+ */
+ public Client(InetSocketAddress sa)
+ throws IOException, SerializationException, BindingException {
+ s = new Socket(sa.getAddress(), sa.getPort());
+ Handshake local = new Handshake();
+ local.methods = Methods.noMethods().getInterface().getMethodDefinitions();
+ Handshake remote = TcpConnection.handshake(s, local);
+ c = new TcpConnection(s, Methods.noMethods(), local, remote);
+ }
+
+ /**
+ * Create a new method interface client. On successful construction the
+ * connection is established over TCP/IP channel.