[BACK]Return to OpenXM.java CVS log [TXT][DIR] Up to [local] / OpenXM / src / OpenMath / ORG / openxm / tam

Diff for /OpenXM/src/OpenMath/ORG/openxm/tam/OpenXM.java between version 1.5 and 1.7

version 1.5, 2000/10/11 08:32:15 version 1.7, 2001/11/01 08:54:50
Line 1 
Line 1 
 /**  /**
  * $OpenXM: OpenXM/src/OpenMath/ORG/openxm/tam/OpenXM.java,v 1.4 2000/09/13 06:32:43 tam Exp $   * $OpenXM: OpenXM/src/OpenMath/ORG/openxm/tam/OpenXM.java,v 1.6 2001/01/28 19:17:24 tam Exp $
  */   */
 package ORG.openxm.tam;  package ORG.openxm.tam;
   
Line 7  import java.io.*;
Line 7  import java.io.*;
 import java.net.*;  import java.net.*;
   
   
   /*&ja
       OpenXM サーバとの接続を行なうクラス.
       クライアント側が使用する.
       接続するサーバ毎に一つの OpenXM クラスが必要.
   */
 /**  /**
  * OpenXM サーバとの接続を行なうクラス.   * OpenXM is a class to connect to OpenXM RFC100 compliant
  * クライアント側が使用する.   * servers.
  * 接続するサーバ毎に一つの OpenXM クラスが必要.   * There is one-to-one correspondence between the instances
    * of the class OpenXM and the OpenXM servers.
  */   */
 public class OpenXM{  public class OpenXM{
   private OpenXMstream control = null, stream = null;    private OpenXMstream control = null, stream = null;
   final protected boolean debug = false;    final protected boolean debug = false;
   
   /**    /*&ja
    * OpenXM サーバとの接続を TCP/IP ソケットを用いて行なう.     * OpenXM サーバとの接続を TCP/IP ソケットを用いて行なう.
    * マシン名 host のポート番号 CtrlPort にコントロールを,     * マシン名 host のポート番号 CtrlPort にコントロールを,
    * ポート番号 StreamPort にデータ用の接続を行なう.     * ポート番号 StreamPort にデータ用の接続を行なう.
    */     */
     /**
      * Connect to an OpenXM server via TCP/IP socket.
      * host : machine name of the OpenXM server.
      * CtrlPort : control port number of the OpenXM server.
      * StreamPort : data port number of the OpenXM server.
      * As to details on the notion of control port and data port, see
      *    Design and Implementation of OpenXM client server model and
      *        common mathematical object format (OpenXM-RFC 100,
      *                                            proposed standard)
      *   at http://www.openxm.org
      */
   public OpenXM(String host,int CtrlPort,int StreamPort) throws IOException{    public OpenXM(String host,int CtrlPort,int StreamPort) throws IOException{
       control = new OpenXMstream(host,CtrlPort);
   
       try{
         Thread.sleep(100); // We need a few wait for starting up server.
       }catch(InterruptedException e){
         System.err.println(e.getMessage());
       }
   
       stream = new OpenXMstream(host,StreamPort);
   
       control.sendByteOrder();
       stream.sendByteOrder();
     }
   
     /**
      * コマンド command を立ち上げ、
      * OpenXM サーバとの接続を TCP/IP ソケットを用いて行なう.
      * マシン名 host のポート番号 CtrlPort にコントロールを,
      * ポート番号 StreamPort にデータ用の接続を行なう.
      */
     public OpenXM(String command,String host,int CtrlPort,int StreamPort)
          throws IOException{
       Runtime.getRuntime().exec(command);
     control = new OpenXMstream(host,CtrlPort);      control = new OpenXMstream(host,CtrlPort);
   
     try{      try{

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.7

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>