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

Feature Request - blocking methods for send() and receive()? #97

Open
armadillu opened this issue Jun 28, 2017 · 1 comment
Open

Feature Request - blocking methods for send() and receive()? #97

armadillu opened this issue Jun 28, 2017 · 1 comment

Comments

@armadillu
Copy link

armadillu commented Jun 28, 2017

Hi! I'm wondering how hard would it be to have blocking methods for send() and receive() for server & client, kinda like ofLoadURL() vs ofLoadURLAsync().

Async is nice, but sometimes you need to deal with protocols that requires a lot of back & forth and it becomes a mess pretty quickly with all the callbacks. (Currently talking to Chrome using DevTools in ofxChrome)

@robotconscience
Copy link
Owner

Hey Oriol! Sorry for the crazy delay—realizing I have something screwed up with my Github notifications. I don't do a ton of OF dev anymore, but do try to keep this addon up to date if I can.

Did you end up digging into this? It's not impossible per se, but threading is woven pretty deep into lws. There's a lot of funkiness that comes in when sending big packets of data, and you'd be stuck in possibly a long loop if/when you send or receive a big packet. Would need to refactor connect, disconnect checks, etc...!

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

2 participants