Skip to content

Conversation

@pSN0W
Copy link
Collaborator

@pSN0W pSN0W commented Nov 29, 2022

This pull request implements the onSlotChange and removeSlotChangeListener function related to issue number #41. The goal here is to get notification every time a slot is changed.

Callback on_subscibe,
Callback on_unsubscribe) {
// create parameters using the user provided input
json param = json::array();
Copy link
Collaborator

Choose a reason for hiding this comment

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

param should be an input to this method.

};
int sub_id = sub.onSlotChange(on_callback, solana::Commitment::CONFIRMED,
on_subscribe, on_unsubscribe);
sleep(10);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Avoid sleep at all costs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants