fix for #190 
Create buffers according to maximum net and application data.
Added a few asserts for better understanding.