log.error("don't recognize request with type=" + req.type);
System.err.println("don't recognize request with type=" + req.type);
        public void run() {            byte[] buf=new byte[65000];            DatagramPacket p=new DatagramPacket(buf, buf.length);            ByteArrayInputStream input;            ObjectInputStream in;            Request req;            boolean running=true;            while(running) {                try {                    recv_sock.receive(p);                    input=new ByteArrayInputStream(p.getData(), 0, p.getLength());                    in=new ObjectInputStream(input);                    req=(Request)in.readObject();                    switch(req.type) {                        case Request.DISCOVERY_REQ:                            byte[] tmp;                            ByteArrayOutputStream output=new ByteArrayOutputStream();                            ObjectOutputStream out=new ObjectOutputStream(output);                            Request rsp=new Request(Request.NEW_MEMBER, local_addr);                            out.writeObject(rsp);                            output.flush();                            tmp=output.toByteArray();                            DatagramPacket rsp_p=new DatagramPacket(tmp, tmp.length,                                    InetAddress.getByName(Test.mcast_addr), Test.mcast_port);                            send_sock.send(rsp_p);                            break;                        case Request.NEW_MEMBER:                            IpAddress new_mbr=(IpAddress)req.arg;                            if(!members.contains(new_mbr)) {                                members.add(new_mbr);                                System.out.println("-- discovered " + new_mbr);                                if(members.size() >= num_members) {                                    System.out.println("-- all members have joined (" + members + ')');                                    running=false;                                    break;                                }                            }                            break;                        default:                            log.error("don't recognize request with type=" + req.type);                            break;                    }                }                catch(IOException e) {                    e.printStackTrace();                    break;                }                catch(ClassNotFoundException e) {                    e.printStackTrace();                }            }        }