import socket


def send_message_tcp(address, port, message):
    """send a message, via tcp

    Args:
        address (str): ip address to send message to
        port (int): port number to send the message to
        message (byte[]): message to send

    Returns:
        str: response from the server
    """
    socket_connection = socket.socket( socket.AF_INET, socket.SOCK_STREAM ) # tcp
    socket_connection.connect((address, port))
    socket_connection.recv(2048)
    socket_connection.send(message)
    response = socket_connection.recv(2048)
    socket_connection.close()
    return response