Exemplo n.º 1
0
  public void connect(String address, String port, boolean isTcp) {
    this.isTcp = isTcp;

    if (isTcp) tcp.connect(address, port);
    else udp.connect(address, port, null);

    connected = true;
  }
Exemplo n.º 2
0
 public void writePlay(int pos) {
   if (isTcp) tcp.write(pos + "");
   else udp.write(pos + "");
 }