1 package org.jgroups.tests.adapttcp; 2 3 import java.net.ServerSocket ; 4 import java.util.List ; 5 6 7 8 24 public class TcpTester { 25 private boolean sender; 26 private int num_msgs; 27 private int msg_size; 28 private int num_senders; 29 private long log_interval=1000; 30 ServerSocket srv_sock; 31 List nodes; 32 33 34 public TcpTester(boolean snd, int num_msgs, 35 int msg_size, int gm, int ns, long log_interval, 36 ServerSocket srv_sock, List nodes) { 37 sender=snd; 38 this.num_msgs=num_msgs; 39 this.msg_size=msg_size; 40 num_senders=ns; 41 this.log_interval=log_interval; 42 this.srv_sock=srv_sock; 43 this.nodes=nodes; 44 } 45 46 public void initialize() { 47 new ReceiverThread(srv_sock, num_msgs, msg_size, num_senders, log_interval).start(); 48 if(sender) { 49 new SenderThread(nodes, num_msgs, msg_size, log_interval).start(); 50 } 51 } 52 } 53 | Popular Tags |