FileDocCategorySizeDatePackage
GameListenerThread.javaAPI DocExample744Tue Dec 12 18:58:44 GMT 2000bingo.shared

GameListenerThread

public class GameListenerThread extends ListenerThread

Fields Summary
private GameListener
notifyee
Constructors Summary
public GameListenerThread(GameListener notifyee)


	super(Constants.GameListeningGroup);
	this.notifyee = notifyee;
    
Methods Summary
public synchronized voidrun()

	DatagramPacket packet;

        while (stopListening == false) {
	    byte[] buf = new byte[256];
            packet = new DatagramPacket(buf, 256);
	    try {
                socket.receive(packet);
		byte[] rcvd = packet.getData();
		String dataString = new String(rcvd);
		notifyee.updateStatus(dataString);
	    } catch (IOException e) {
		    // PENDING: what goes in here?
	    }
        }