ret.setDest(dest);
    public Message receive() {        Message ret=null;        byte[] buf=null;        int len;        if(sock == null || output == null || input == null) {            if(log.isErrorEnabled()) log.error("no connection to router");            connected=false;            return null;        }        try {            len=input.readInt();            if(len == 0) {                ret=null;            }            else {                buf=new byte[len];                input.readFully(buf, 0, len);                ret=new Message(false);                ByteArrayInputStream tmp=new ByteArrayInputStream(buf);                DataInputStream in=new DataInputStream(tmp);                ret.readFrom(in);                in.close();            }        }        catch(Exception e) {            if (connected) {                if(log.isTraceEnabled()) log.trace("failed receiving message", e);            }            connected=false;            return null;        }        if(log.isTraceEnabled()) log.trace("received "+ret);        return ret;    }