@Override
    public void del(String key) throws KVException {
    	if (key == null || key.length() == 0)
        	throw new KVException(KVConstants.ERROR_INVALID_KEY);
        
        KVMessage kvm = new KVMessage(KVConstants.DEL_REQ);
        kvm.setKey(key);
        
        Socket sock = null;
        
        try {
        	sock = connectHost();
        	kvm.sendMessage(sock);
        	
        	KVMessage receive = new KVMessage(sock);
        	if (!receive.getMessage().equals(KVConstants.SUCCESS))
        		throw new KVException(receive.getMessage());
        }
        catch (KVException ex) {
        	throw ex;
        }
        finally {
        	if (sock != null)
        		closeHost(sock);
        }
    }