allanbank / mongodb-async-driver

The MongoDB Asynchronous Java Driver.
Apache License 2.0
22 stars 15 forks source link

Add support for additional/custom connection models. #4

Open allanbank opened 9 years ago

allanbank commented 9 years ago

We should make it as easy as possible to add support for custom connection models. This will require removing a significant amount of the code from the SocketConnection classes and moving it to classes in the driver proper.

The goal is to enable supporting a socket library like Netty in as little code as possible. Since most socket management code also has buffer management built in we also need to make sure that the send/receive buffers leverage the library provided version to the greatest extent possible. This includes making sure that the buffers know what size read/write to expect.