public ChatChannel[] getAllPublicChannels(){
		ChatChannel[] channels = null;
		try {
			Socket chatSocket = new Socket(SERVER_ADDRESS_LOGIN, CHAT_PORT);
			
			chatSocket.setSoTimeout(TIMEOUT);
			
			OutputStream outputStream = chatSocket.getOutputStream();
			ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
			objectOutputStream.writeObject("GET_ALL_PUBLIC_CHANNELS");
			objectOutputStream.flush();

			InputStream inputStream = chatSocket.getInputStream();
			ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);
			channels = (ChatChannel[])objectInputStream.readObject();
			
			chatSocket.close();
			
		}catch (SocketException e){
			new ErrorFrame("Chat Server unreachable!");
		} catch (SocketTimeoutException e){
			new ErrorFrame("Connection timed out");
		} catch (Exception e) {
			new ErrorFrame("An unknown Error occoured");
			e.printStackTrace();
		}
		return channels;
	}