refactor: changing behaviour when "content-length" is given
update `Socket` type requirement

This update restricts the usage of the object to give more freedom to
implementing types.
fix documentation typo
improve build system