Click here to Skip to main content
15,882,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all, I have a net core API hosted on a Linux box on my LAN, its main purpose is to return data from a Postgresql database. Events are raised by Postgresql when specific things occur and I receive these in my controllers via an event listener with a payload. What I wuld like to be able to do , is, pass these events to the callee ( usually my web server which is also hosted on my LAN ) is this doable ? or is there a better way of doing this ?

What I have tried:

I've found a way of recieving notifications from Postgresql ( with a payload ) but can't think of a way to send the data back to the callee IHTMS
Updated 1-Feb-23 4:44am

1 solution

The entire HTTP paradigm prevents this. HTTP/HTTPS servers NEVER call the client. You cannot use your normal web API methods to send notifications to the clients. HTTP follows a request/response model. The client makes a request and the server returns the response to it. The server can never just send something to the client if the client didn't request it.

You need an alternate server and communication channel to push updates, like SignalR, or the like.
Share this answer
pkfox 1-Feb-23 10:51am    
Ok thanks Dave

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900