Shared/Networking: Fix buffer overflow in Socket handling

Fix a buffer overflow caused by Boost trying to store too much data in a buffer too small.