private void startServer() {
        parent.setClientSocket(socket);
        InputStream is = null;
        parent.append("> New Client: "+socket.getInetAddress().getHostAddress());
        try {
            is = socket.getInputStream();
            in = new BufferedReader(new InputStreamReader(is));
        } catch(IOException e) {
            parent.append("> Cound't open input stream on Client "+e.getMessage());
            setDesonnected(true);
            return;
        }
        
        String rec=null;
        while(true) {
            rec=null;
            try	{
                rec = readInputStream(in);//in.readLine();
            } catch (Exception e) {
                setDesonnected(true);
                if(!desonnected) {
                    parent.error(e.getMessage(),"Lost Client connection");
                    parent.append("> Server lost Client connection.");
                } else
                    parent.append("> Server closed Client connection.");
                break;
            }
            if (rec != null) {
            	parent.append("Empfangen: "+rec);
            	if(rec.length()>0){
            		th.handle(rec);
            	}
            } else {
                setDesonnected(true);
                parent.append("> Client closed connection.");
                break;
            }
        } //end of while
    } //end of startServer