简体   繁体   中英

triggering events “over the wire” in .net

I need a way to trigger events on remote processes "over the wire" and pass parameters (xml serialization, whatever). I want to be able to do things like this.

foreach(childClient c in clientList)
{
    MyEvent += c.EventHandler;
}

MyEvent("param");

what technologies are good for this? WCF?

This is a small deployment in house software project so minimal overhead in design is a plus, doesn't have to be "fast" and won't handle large amounts of traffic.

There are a number of ways of doing this, but WCF is the best match for .NET code. If you are in-house then hopefully firewalls, etc aren't too much of a concern, and you can use the NET.TCP bindings which are full duplex. You want to read up on callback contracts .

There are a number of examples out there, such as this one .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM