test/jdk/java/net/Socket/DeadlockTest.java
author erikj
Tue, 12 Sep 2017 19:03:39 +0200
changeset 47216 71c04702a3d5
parent 7668 jdk/test/java/net/Socket/DeadlockTest.java@d4a77089c587
child 49431 5812849b5027
permissions -rw-r--r--
8187443: Forest Consolidation: Move files to unified layout Reviewed-by: darcy, ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
7668
d4a77089c587 6962318: Update copyright year
ohair
parents: 6115
diff changeset
     2
 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
 * @test
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
 * @bug 4176738
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 * @summary Make sure a deadlock situation
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 *     would not occur
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import java.net.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
import java.io.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
public class DeadlockTest {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
    public static void main(String [] argv) throws Exception {
6115
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    36
        ServerSocket ss = new ServerSocket(0);
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    37
        Socket clientSocket = new Socket();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
6115
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    39
        try {
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    40
            // Start the server thread
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    41
            Thread s1 = new Thread(new ServerThread(ss));
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    42
            s1.start();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
6115
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    44
            // Start the client thread
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    45
            ClientThread ct = new ClientThread(clientSocket, ss.getLocalPort());
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    46
            Thread c1 = new Thread(ct);
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    47
            c1.start();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
6115
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    49
            // Wait for the client thread to finish
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    50
            c1.join(20000);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
6115
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    52
            // If timeout, we assume there is a deadlock
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    53
            if (c1.isAlive() == true) {
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    54
                // Close the socket to force the server thread
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    55
                // terminate too
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    56
                s1.stop();
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    57
                throw new Exception("Takes too long. Dead lock");
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    58
            }
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    59
        } finally {
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    60
            ss.close();
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    61
            clientSocket.close();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
class ServerThread implements Runnable {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
    private static boolean dbg = false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    ObjectInputStream  in;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
    ObjectOutputStream out;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
    ServerSocket server;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
    Socket sock;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
6115
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    77
    public ServerThread(ServerSocket serverSocket) throws Exception {
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
    78
        this.server = serverSocket;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
    public void ping(int cnt) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
       Message.write(out, new PingMessage(cnt));
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
    private int cnt = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
    public void run() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
            if (Thread.currentThread().getName().startsWith("child") == false) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
                sock  = server.accept();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
                new Thread(this, "child").start();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
                out = new ObjectOutputStream(sock.getOutputStream());
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
                out.flush();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
                if (dbg) System.out.println("*** ping0 ***");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
                ping(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
                if (dbg) System.out.println("*** ping1 ***");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
                ping(1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
                if (dbg) System.out.println("*** ping2 ***");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
                ping(2);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
                if (dbg) System.out.println("*** ping3 ***");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
                ping(3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
                if (dbg) System.out.println("*** ping4 ***");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
                ping(4);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
                if (dbg) System.out.println("*** end ***");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        } catch (Throwable e) {
6115
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
   112
            System.out.println(e);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
            // If anything goes wrong, just quit.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
        if (Thread.currentThread().getName().startsWith("child")) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
            try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
                in  = new ObjectInputStream(sock.getInputStream());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
                while (true) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
                    if (dbg) System.out.println("read " + cnt);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
                    Message msg = (Message) in.readObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
                    if (dbg) System.out.println("read done " + cnt++);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
                    switch (msg.code) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
                    case Message.PING: {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
                        if (true) System.out.println("ping recv'ed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
                    } break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
            } catch (Throwable e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
                // If anything goes wrong, just quit.       }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
class ClientThread implements Runnable {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
    ObjectInputStream  in;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    ObjectOutputStream out;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    Socket sock;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
6115
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
   147
    public ClientThread(Socket sock, int serverPort) throws Exception {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        try {
6115
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
   149
            System.out.println("About to connect the client socket");
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
   150
            this.sock = sock;
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
   151
            this.sock.connect(new InetSocketAddress("localhost", serverPort));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
            System.out.println("connected");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
            out = new ObjectOutputStream(sock.getOutputStream());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
            out.flush();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
        } catch (Throwable e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
          System.out.println("client failed with: " + e);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
          e.printStackTrace();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
          throw new Exception("Unexpected exception");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
    private int cnt = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
    public void run() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
          in  = new ObjectInputStream(sock.getInputStream());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
          int count = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
          while (true) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
              System.out.println("read " + cnt);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
              Message msg = (Message) in.readObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
              System.out.println("read done " + cnt++);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
              switch (msg.code) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
              case Message.PING: {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
                  System.out.println("ping recv'ed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
                  count++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
              } break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
              }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
              if (count == 5) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
                  sock.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
                  break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
              }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
          }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
        }  catch (IOException ioe) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
        } catch (Throwable e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
            // If anything went wrong, just quit
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
class Message implements java.io.Serializable {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
    static final int UNKNOWN = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    static final int PING = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
    protected int code;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
    public Message() { this.code = UNKNOWN; }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
    public Message(int code) { this.code = code; }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
    private static int cnt = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
    public static void write(ObjectOutput out, Message msg) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
            System.out.println("write message " + cnt);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
            out.writeObject(msg);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
            System.out.println("flush message");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
            out.flush();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
            System.out.println("write message done " + cnt++);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
        } catch (IOException ioe) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
            // Ignore the exception
6115
7c523cf2bc8a 6969395: TEST_BUG: Tests in java/net sun/net problems
chegar
parents: 5506
diff changeset
   216
            System.out.println(ioe);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
     }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
class PingMessage extends Message implements java.io.Serializable {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
      public PingMessage() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
          code = Message.PING;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
      public PingMessage(int cnt)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
      {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
          code = Message.PING;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
          this.cnt = cnt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
          data = new int[50000];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
      int cnt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
      int[] data;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
}