try {
BufferedReader userInput
= new BufferedReader(new InputStreamReader(System.in));
while (true) {
if (stopped) return;
String theLine = userInput.readLine();
if (theLine.equals(".")) break;
byte[] data = theLine.getBytes();
DatagramPacket theOutput
= new DatagramPacket(data, data.length, server, port);
socket.send(theOutput);
Thread.yield();
}
} // end try
catch (IOException e) {
System.err.println(e);
}