I have a WCF duplex channel. In the callback, the WCF service shall notify the client and asynchronously wait till the client has completely processed the notification.
In this article I found how I could implement the callback interface:
public interface IClientCallback
{
[OperationContract(IsOneWay = true)]
Task NotifySomething();
}
// call from WCF service
await clientCallback.NotifySomething();
This is exacly what I need, but I'm a little surprised, because I thought that one way operations can only have void
as return type.
See also this MSDN article:
One-way methods must not return a value or have ref or out parameters
So is the above code really the correct solution for my problem?