<commit_before>This plug-in is used to send and receive the JSON object directly with Web Sockets API.

NOTE: this is a fork of http://code.google.com/p/jquery-websocket/, which has many issues reported
but no activity in the code since 2010.

# Usage

## Connection

    var ws = $.websocket("ws://127.0.0.1:8080/");

## Sending Message

    ws.send('hello');                          // sending message is '{type:'hello'}'.
    ws.send('say', {name:'foo', text:'baa'});  // sending message is '{type:'say', data:{name:'foo', text:'baa'}}'

## Event Handling

    var ws = $.websocket("ws://127.0.0.1:8080/", {
        open: function() { ... },
        close: function() { ... },
        events: {
            say: function(e) {
                alert(e.data.name); // 'foo'
                alert(e.data.text); // 'baa'
            }
        }
    });

# Example

<commit_msg>you've been warned<commit_after>Send and receive the JSON object directly with Web Sockets API.

# This is a fork

http://code.google.com/p/jquery-websocket/ had several issues reported
but no activity in the code since 2010. I needed to make a change and
decided I might as well fork and post it. There have been a few contributions
as a result, which is great to see (thank you, contributors!).

There are, however, no automated tests! "WAT?", you ask! Yes, its
true. No tests. You've been warned.

# Usage

## Connection

    var ws = $.websocket("ws://127.0.0.1:8080/");

## Sending Message

    ws.send('hello');                          // sending message is '{type:'hello'}'.
    ws.send('say', {name:'foo', text:'baa'});  // sending message is '{type:'say', data:{name:'foo', text:'baa'}}'

## Event Handling

    var ws = $.websocket("ws://127.0.0.1:8080/", {
        open: function() { ... },
        close: function() { ... },
        events: {
            say: function(e) {
                alert(e.data.name); // 'foo'
                alert(e.data.text); // 'baa'
            }
        }
    });

# Example


{'fraction_non_alphanumeric': 0.1657486229344016, 'fraction_numerical': 0.024036054081121683, 'mean_word_length': 2.191693290734824, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '273195', 'n_tokens_mistral': 669, 'n_tokens_neox': 604, 'n_words': 192}