Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Event] Add new event type #225

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/nnstreamer-edge-event.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ typedef enum {
NNS_EDGE_EVENT_NEW_DATA_RECEIVED,
NNS_EDGE_EVENT_CALLBACK_RELEASED,
NNS_EDGE_EVENT_CONNECTION_CLOSED,
NNS_EDGE_EVENT_CONNECTION_COMPLETED,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this message indicate that the network connection was successfully (completed)established? Or does it mean that the network connection is active?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It means that the network connection was successfully established.
If network connection status is changed to inactive, NNS_EDGE_EVENT_CONNECTION_CLOSED event will be invoked.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the detailed explanation. 🙏


NNS_EDGE_EVENT_CUSTOM = 0x01000000
} nns_edge_event_e;
Expand Down
6 changes: 6 additions & 0 deletions src/libnnstreamer-edge/nnstreamer-edge-internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,12 @@ _nns_edge_accept_socket (nns_edge_handle_s * eh)
conn_data->sink_conn = conn;
}

ret = nns_edge_event_invoke_callback (eh->event_cb, eh->user_data,
NNS_EDGE_EVENT_CONNECTION_COMPLETED, NULL, 0, NULL);
if (ret != NNS_EDGE_ERROR_NONE) {
nns_edge_loge ("Failed to send an event for new connection.");
goto error;
}
done = true;

error:
Expand Down
Loading