Skip to content

Conversation

@pSN0W
Copy link
Collaborator

@pSN0W pSN0W commented Nov 29, 2022

This pr implements the functions onSlotUpdate and removeSlotUpdateListener associated with #41 The aim here is to get notification whenever any of the slot is updated.

sess->unsubscribe(sub_id);
}

int WebSocketSubscriber::onSlotUpdate(Callback callback,
Copy link
Collaborator

Choose a reason for hiding this comment

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

params should be an input variable for all of the methods.

};
int sub_id = sub.onSlotUpdate(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 in all your code. Use futures.

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