@Override
		public void run() {
            try {
                KVMessage kvm = new KVMessage(client.getInputStream());
                String type = kvm.getMsgType();
                KVMessage resp = new KVMessage("resp", "Success");
                if(type.equals("getreq"))
                {
                    resp.setKey(kvm.getKey());
                    resp.setValue(kvServer.get(kvm.getKey()));
                    resp.setMessage(null);
                }
                else if(type.equals("putreq"))
                    kvServer.put(kvm.getKey(), kvm.getValue());
                else if(type.equals("delreq"))
                    kvServer.del(kvm.getKey());
                else
                    throw new KVException(new KVMessage("Unknown Error: invalid req type"));
                resp.sendMessage(client);
            } catch(KVException e) {
                try{
                	e.getMsg().sendMessage(client);
                } catch(KVException e1){}
            } catch(Exception e) {
                try{
                	new KVMessage("IO Error").sendMessage(client);
                } catch(KVException e1){}
            }
		}