<commit_before>octo-sansa
==========

[![CI Status](http://img.shields.io/travis/thepatrick/octo-sansa.svg?style=flat)](https://travis-ci.org/thepatrick/octo-sansa-objc)
[![Version](https://img.shields.io/npm/v/octo-sansa.svg?style=flat)](http://npmjs.org/package/octo-sansa)
[![License](https://img.shields.io/github/license/thepatrick/octo-sansa.svg)](http://github.org/thepatrick/octo-sansa)

A very simple TCP (client/server) messaging layer

Getting started
---------------

A simple "echo" server:

```javascript

const octo = require('octo-sansa');

const server = octo.createServer(client => {
  client.on('echo', (body, callback) => {
    console.log('Client said', body);
    callback(undefined, body);
  });
});

server.listen(1234, () => {
  console.log('Server listening on ' + server.address().port);
});

```

A simple "echo" client:

```javascript

const octo = require('octo-sansa');

const client = octo.createClient(1234, 'localhost');

client.on('connected', () => {
  client.ask('echo', 'Say hello server', (err, response) => {
    console.log('The server said', response);
    client.close();
  });
});

```

TODO
----

Documentation of the API.
<commit_msg>Fix link to travis-ci<commit_after># octo-sansa

[![CI Status](http://img.shields.io/travis/thepatrick/octo-sansa.svg?style=flat)](https://travis-ci.org/thepatrick/octo-sansa)
[![Version](https://img.shields.io/npm/v/octo-sansa.svg?style=flat)](http://npmjs.org/package/octo-sansa)
[![License](https://img.shields.io/github/license/thepatrick/octo-sansa.svg)](http://github.org/thepatrick/octo-sansa)

A very simple TCP (client/server) messaging layer

Getting started
---------------

A simple "echo" server:

```javascript

const octo = require('octo-sansa');

const server = octo.createServer(client => {
  client.on('echo', (body, callback) => {
    console.log('Client said', body);
    callback(undefined, body);
  });
});

server.listen(1234, () => {
  console.log('Server listening on ' + server.address().port);
});

```

A simple "echo" client:

```javascript

const octo = require('octo-sansa');

const client = octo.createClient(1234, 'localhost');

client.on('connected', () => {
  client.ask('echo', 'Say hello server', (err, response) => {
    console.log('The server said', response);
    client.close();
  });
});

```

TODO
----

Documentation of the API.

{'fraction_non_alphanumeric': 0.21622769753610874, 'fraction_numerical': 0.006796941376380629, 'mean_word_length': 4.256696428571429, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, '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': '1607478', 'n_tokens_mistral': 886, 'n_tokens_neox': 834, 'n_words': 138}