REFACTOR sendHttpSocket() function implementing hybric static/dynamic buffer approach