I am looking for subscribing the event on websocket most likely as given in below link
I m not sure whether its old way for subscribing the solidity event or something that truffle handling insides its own way.
Lets take a scenario of supply chain where a customer placed an order.As soon as same order has approved there is an event emitted in smart contract which should only notify to that customer only i.e. only to those listeners who subscribed to that event.Customer’s frond end just subscribed the event and when any notification available for that customer ethereum will push notification to him so frond end don’t need to poll it at regular time interval.
Please help me to understand with an code example if you have.