Instance Method close() Close the running connection. Once the close has completed closures that were registered in onClose must be invoked. func close()