Skip to content

Instantly share code, notes, and snippets.

@wnoizumi
Created March 14, 2012 23:27
Show Gist options
  • Save wnoizumi/2040369 to your computer and use it in GitHub Desktop.
Save wnoizumi/2040369 to your computer and use it in GitHub Desktop.
Verificador portas
package br.uem.din.verificadorPortas;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.DatagramSocket;
import java.util.ArrayList;
public class Main {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String in;
while (true) {
System.out.println("Digite as portas separadas por virgula: ");
System.out.print("> ");
in = reader.readLine();
if (in.equals("")) {
break;
}
String[] portasStr = in.split(",");
List<int> portas = new ArrayList();
DatagramSocket socket = new DatagramSocket();
// socket.
//System.out.println("Você digitou: " + in);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment