<commit_before># LICENSE
MIT License <http://www.opensource.org/licenses/mit-license.php>

# RAW Connection API

## Creating a handler
Create a handler (ashx) for your connection or use Routing to hook up your handler:

Global.asax

    using System;
    using System.Web.Routing;
    using SignalR.Routing;

    public class Global : System.Web.HttpApplication {
        protected void Application_Start(object sender, EventArgs e) {
            // Register the route for chat
            RouteTable.Routes.MapConnection<MyConnection>("echo", "echo/{*operation}");
        }
    }


## Server
    // Server url : http://localhost/myconnection.ashx or http://localhost/echo (Routing)
    using SignalR;
    
    public class MyConnection : PersistentConnection {
        protected override void OnReceived(string clientId, string data) {
            // Broadcast data to all clients
            Connection.Broadcast(data);
        }
    }

## Client
### Javascript
Add these scripts to your page:

    <script src="Scripts/jquery-1.6.2.min.js" type="text/javascript"></script>
    <script src="Scripts/jquery.signalR.min.js" type="text/javascript"></script>

HTML:

    <script type="text/javascript">
    $(function () {
        var connection = $.connection('echo');

        connection.received(function (data) {
            $('<li/>').html(data).appendTo($('#messages'));
        });
        
        connection.start();<commit_msg>Fixed readme to make it more clean<commit_after># LICENSE
MIT License <http://www.opensource.org/licenses/mit-license.php>

# RAW Connection API
## Server
Create a class the derives from PersistentConnection:

    using SignalR;
    
    public class MyConnection : PersistentConnection {
        protected override void OnReceived(string clientId, string data) {
            // Broadcast data to all clients
            Connection.Broadcast(data);
        }
    }

## Setup Routing
Make a route for your connection:

Global.asax

    using System;
    using System.Web.Routing;
    using SignalR.Routing;

    public class Global : System.Web.HttpApplication {
        protected void Application_Start(object sender, EventArgs e) {
            // Register the route for chat
            RouteTable.Routes.MapConnection<MyConnection>("echo", "echo/{*operation}");
        }
    }

## Client
### Javascript
Add these scripts to your page:

    <script src="Scripts/jquery-1.6.2.min.js" type="text/javascript"></script>
    <script src="Scripts/jquery.signalR.min.js" type="text/javascript"></script>

HTML:

    <script type="text/javascript">
    $(function () {
        var connection = $.connection('echo');

        connection.received(function (data) {
            $('<li/>').html(data).appendTo($('#messages'));
        });
        
        connection.start();
{'fraction_non_alphanumeric': 0.12317029632274187, 'fraction_numerical': 0.0021420921099607284, 'mean_word_length': 2.796747967479675, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, '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': '6729382', 'n_tokens_mistral': 775, 'n_tokens_neox': 755, 'n_words': 198}