Skip to content

send_bytes in receive callback #18

Open
@reinzor

Description

@reinzor

Hi,

I am trying to call the send_bytes method in a registered receive_callback; however, the data is never sent. Am I doing something wrong or what could be the issue here?

Setup:

void callback(const uint8_t* buf, size_t len)
{
  char message[] = "hello world!";
  udp.send_bytes((uint8_t*) message, std::strlen(message));
}

// open UDP ports
async_comm::UDP udp("localhost", 14620, "localhost", 14625);
udp.register_receive_callback(&callback);

Thanks,

Rein

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions