int newMaxBuff=512000; setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &newMaxBuff, sizeof(newMaxBuff));