Added functionality to specify max body size and receive buffer size.