public static void main() throws Exception
    {
        DatagramSocket serverSocket = new DatagramSocket(11010);
        byte[] receiveData = new byte[12];
        byte[] sendData = new byte[340];
        String reqString;
        DatagramPacket sendPacket;
        int port;
        InetAddress IPAddress;
        Main.debug("[ChannelList]", "Walked on port " + 11010 + "!");
        Main.debug("[Server]", "Server Started!");
        while(true)
        {
            DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);
            serverSocket.receive(receivePacket);
            reqString = new String( receivePacket.getData(),"ISO8859-1");

            if (reqString.startsWith("\u00FA\u002A\u0002"))
            {
                debug("[ChannelList] Channel List Requested.,");
                getChannels();

                //make packet
                String channel_packet = new String(CHANNEL_HEADERBYTE,"ISO8859-1");;
                for (int i = 0; i < channel_i; i++)
                    channel_packet += channel_detail[i];
                
                for (int i = 0; i < 12-channel_i; i++)
                    channel_packet += new String(CHANNEL_EMPTY,"ISO8859-1");

                for (int i = 0; i < 4;i++)
                    channel_packet += new String(CHANNEL_FOOTER,"ISO8859-1");


                sendData = channel_packet.getBytes("ISO8859-1");

                IPAddress = receivePacket.getAddress();

                port = receivePacket.getPort();

                sendPacket = new DatagramPacket(sendData, sendData.length, IPAddress, port);


                serverSocket.send(sendPacket);
                debug("[ChannelList] Sent Channels");
            }
        }
    }