void close()
	{
		try {
			if(socket!=null)
			{
				Message m=new Message(this.roomid, Msg.user, "", UserSetting.username, "<quit>","");
				write(m);
				if(objOut!=null)
				{
					objOut.close();
					objOut=null;
				}
				if(objIn!=null)
				{
					objIn.close();
					objIn=null;
				}
				socket.close();
				socket=null;
				
				//System.out.println("Socket:["+m.roomid+"] closed");
			}		
			main=null;
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}