Updated network connection implementation.