Shared: Base server tcp socket framework