コード例 #1
0
ファイル: MallAction.java プロジェクト: smsg-game/smsg-server
  /**
   * @param args
   * @throws IOException
   * @throws UnknownHostException
   * @throws InterruptedException
   */
  public static void main(String[] args)
      throws UnknownHostException, IOException, InterruptedException {
    // Socket socket = new Socket("110.76.45.122", 10000);
    Socket socket = new Socket("127.0.0.1", 10000);
    UserAction u = new UserAction();
    MallAction t = new MallAction();

    u.login(socket);
    t.getMallList(socket);

    BufferedInputStream in = new BufferedInputStream(socket.getInputStream());
    while (true) {
      read(in);
      Thread.sleep(100);
    }
  }
コード例 #2
0
ファイル: UserAction.java プロジェクト: smsg-game/smsg-server
 /**
  * @param args
  * @throws IOException
  * @throws UnknownHostException
  * @throws InterruptedException
  */
 public static void main(String[] args)
     throws UnknownHostException, IOException, InterruptedException {
   // Socket socket = new Socket("110.76.45.122", 10000);
   Socket socket = new Socket("127.0.0.1", 10000);
   UserAction u = new UserAction();
   u.login(socket);
   u.checkName(socket);
   //		u.buyBag(socket);
   BufferedInputStream in = new BufferedInputStream(socket.getInputStream());
   while (true) {
     read(in);
     Thread.sleep(100);
   }
   // u.loadInfo(socket);
   // u.create(socket);
   // u.loadInfo(socket);
   // u.logout(socket);
   // createUserToken();
 }