Made the socket buffer size configurable through the constructor. Beware of possible memory leaks