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

Calling Web API Controller from WS? #1

Open
MarkPieszak opened this issue Aug 19, 2016 · 2 comments
Open

Calling Web API Controller from WS? #1

MarkPieszak opened this issue Aug 19, 2016 · 2 comments

Comments

@MarkPieszak
Copy link

So in the example we have an echoloop, but how can we more realistically implement & pass a method & payload with the websocket which in turn calls a Web API controller let's say, and then returns that outgoing response from it.

Looking into it now, post when I get more info and/or get it working!

@zbrad
Copy link
Owner

zbrad commented Aug 25, 2016

well usually once you have the websocket, you just start sending messages, most common would be json messages, which then dispatch to handlers. I'll update and repost the pubsub demo (updated for core 1.0), which shows do I used message dispatching.

@MarkPieszak
Copy link
Author

MarkPieszak commented Aug 25, 2016

Thank you @zbrad, really appreciate the guidance!
I'm just used to doing it all with NodeJS (SocketIO and others make it extremely easy), it's a whole new world in .NET Core hasn't seemed as obvious to me how to receive data, pass it through some kind of Eventing System, run code on it, then return the result back through the websocket.

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