import click


def common_tcp_options(func):
    """Supply common tcp gateway options."""
    func = click.option(
        "-p",
        "--port",
        default=5003,
        show_default=True,
        type=int,
        help="TCP port of the connection.",
    )(func)
    func = click.option(
        "-H", "--host", required=True, help="TCP address of the gateway."
    )(func)
    return func