<commit_before>### General:
- write documentation
- adds embedded code example to the front page
- setup documentation generation and site and github pages
- setup CI with appveyor once mio is compatible with windows

### Current problem:  
If no pipe is available when sending or receiving, an error is returned.
The expected behavior is to wait the timeout for a pipe to be added (via reconnect or accept).
To be able to do that, it would require to move the pending message from proto-pipe to protocol.
Each proto-pipe would then keep the progress status.
In that case, status should be: sent, sending, postponed, failed, or none if no operation is in progress.
When a proto-pipe becomes ready, any pending operation should be handed to that proto-pipe.
When the operation is finished, each proto-pipe is notified of the operation completion.

For protocol that are sent to single, when a proto pipe status becomes sending or receiving,
the other proto-pipes should have their current operation cancelled.

Since pipe already holds the message to be sent of the on going operation, 
it should be possible to avoid storing it in the proto-pipe.
This requires to not clear the operation when it is postponed and to notify the protocol when a progress is started during readiness, in case it would be a send-to-single one.

### Next problem:
There is too much code duplication in the protocol part.
Refactor the proto pipes with some traits to share more code.
Traits could be:
- SenderPipe
- ReceiverPipe
- TwoWayPipe

Refactoring the protocols may be harder but there are some crosscutting aspects:
- Send to single (pair, push, req, rep, resp)
- Send to many (bus, pub, surv)
- No sending (pull, sub)

Some header related code could also be shared:
- Message with id (req/rep, surv/resp)
- Send back to originator only (req/rep, surv/resp)

### Refactors:  
- Rename session into something less oriented ? (context, environment ...)
- Remove association between token and socketid when a pipe is dead
- Register to readable or writable only when required, that is when operation status is in progress ? 
- find a better name for socket_impl and session_impl
- maybe the acceptor could create pipes instead of connections ?
- Implement Read & Write trait on sockets
- Use a pool for payloads

### Features:
- For raw bus socket, store the pipe token in the header when receving a message. When sending, check if there is a pipe token in the header and skip the specified pipe
- Check what to do when send/recv timeout is reached and parts of the message has already been transfered !
- Have Socket::connect & bind return an Endpoint that can be shut down
- Implement nanocat
- Expose the event loop configuration ?

### Stuff to look at:
https://github.com/dpc/mioco  
https://github.com/dwrensha/gj  
https://github.com/zonyitoo/simplesched  
https://github.com/alexcrichton/wio (for appveyor ci script and doc publication)  <commit_msg>Makes resp a single peer<commit_after>### General:
- write documentation
- adds embedded code example to the front page
- setup documentation generation and site and github pages
- setup CI with appveyor once mio is compatible with windows

### Current problem:  
If no pipe is available when sending or receiving, an error is returned.
The expected behavior is to wait the timeout for a pipe to be added (via reconnect or accept).
To be able to do that, it would require to move the pending message from proto-pipe to protocol.
Each proto-pipe would then keep the progress status.
In that case, status should be: sent, sending, postponed, failed, or none if no operation is in progress.
When a proto-pipe becomes ready, any pending operation should be handed to that proto-pipe.
When the operation is finished, each proto-pipe is notified of the operation completion.

For protocol that are sent to single, when a proto pipe status becomes sending or receiving,
the other proto-pipes should have their current operation cancelled.

Since pipe already holds the message to be sent of the on going operation, 
it should be possible to avoid storing it in the proto-pipe.
This requires to not clear the operation when it is postponed and to notify the protocol when a progress is started during readiness, in case it would be a send-to-single one.

### Next problem:
There is too much code duplication in the protocol part.
Refactor the proto pipes with some traits to share more code.
Traits could be:
- SenderPipe
- ReceiverPipe
- TwoWayPipe

Refactoring the protocols may be harder but there are some crosscutting aspects:
- Send to single (pair, push, req, rep, resp)
- Send to many (bus, pub, surv)
- No sending (pull, sub)

Some header related code could also be shared:
- Message with id (req/rep, surv/resp)
- Send back to originator only (req/rep, surv/resp)

### Refactors:  
- Rename session into something less oriented ? (context, environment ...)
- Remove association between token and socketid when a pipe is dead
- Register to readable or writable only when required, that is when operation status is in progress ? 
- find a better name for socket_impl and session_impl
- maybe the acceptor could create pipes instead of connections ?
- Implement Read & Write trait on sockets
- Use a pool for payloads

### Features:
- For raw bus socket, store the pipe token in the header when receving a message. When sending, check if there is a pipe token in the header and skip the specified pipe
- Check what to do when send/recv timeout is reached and parts of the message has already been transfered !
- Have Socket::connect & bind return an Endpoint that can be shut down
- Implement nanocat
- Expose the event loop configuration ?

### Stuff to look at:
https://github.com/dpc/mioco  
https://github.com/dwrensha/gj  
https://github.com/zonyitoo/simplesched  
https://github.com/alexcrichton/wio (for appveyor ci script and doc publication too)  
{'fraction_non_alphanumeric': 0.0542832909245123, 'fraction_numerical': 0.0, 'mean_word_length': 4.100346020761246, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, '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': '1279102', 'n_tokens_mistral': 1513, 'n_tokens_neox': 1471, 'n_words': 889}