----------------------------
    function ready() {
        log('Connection Established.');
        send('hello');
    }

    // ----------------------------------------------
    // Received Message
    // ----------------------------------------------
    function receive(message) {
        log('Received a Message.');
        log(message);
        log('Closing Connection');
        pubnub.unsubscribe({ channel : channel });
    }

    // ----------------------------------------------
    // Send a Message