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

Any plan to provide a synchronous API? #20

Open
LudovicRousseau opened this issue Sep 24, 2014 · 4 comments
Open

Any plan to provide a synchronous API? #20

LudovicRousseau opened this issue Sep 24, 2014 · 4 comments

Comments

@LudovicRousseau
Copy link
Contributor

I am not sure to love call backs so much. Sometimes a synchronous API is fine, especially when you want to send a sequence of APDU and have nothing better to do.

Do you plan to also provide a synchronous version like it is the case for File IO API?
http://www.daveeddy.com/2013/03/26/synchronous-file-io-in-nodejs/

@santigimeno
Copy link
Owner

No, I hadn't thought of it. Do you have a specific API in mind? I guess you'd like a sync version of the CardReader functions, right?

@LudovicRousseau
Copy link
Contributor Author

Maybe something like what https://github.com/coolbong/node-pcsc is doing?

A synchronous transmit() and control() would be cool in a first step.

@alba-ado
Copy link

Can't you use async/await?

@LudovicRousseau
Copy link
Contributor Author

Maybe using async/await is the solution.
Feel free to close the issue.

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

No branches or pull requests

3 participants