Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I read some articles about duplex communication and using callbacks but the way i seen it, it was always like this: callBacks used in a OperationContract. so when a client calls a OperationContract, the service calls back for the client.
but i want the opposite situation. the server sends a request and client should answer it.
in the described wcf duplex communication client requests for a service, and server sends some notification to client using callback. but i want Server start this process and send a request to client,then client answer to server.
now my client checks for new requests every 5 sec.
please help me.
thanks
Posted
Updated 19-May-12 21:10pm
v5

1 solution

As you can read also here (http://msdn.microsoft.com/en-us/library/cc645026(v=vs.95).aspx[^]), this functionality depend on the transport protocol you use. Since http uses a tipical request-replay scenario and in most cases the port opened for listening on client side would be inaccessible to the server, you have only this polling mechanism. But if your environment enables you to use WCF over TCP, than you will have a real duplex communication.
 
Share this answer
 
Comments
mahdi87_gh 19-May-12 10:36am    
thanks i will read it and come back
mahdi87_gh 20-May-12 0:40am    
the link you provide isn't what i mean and also it describe for a Silverlight client application.
in the described wcf duplex communication client requests for a service, and server sends some notification to client using callback. but i want Server start this process and send a request to client,then client answer to server
Zoltán Zörgő 20-May-12 7:07am    
What kind of binding are you using? http, msmq, namedpipe, tcp..?
mahdi87_gh 20-May-12 23:29pm    
it doesn't matter for me. I'll use it in a Local Lan
Zoltán Zörgő 2-Jun-12 12:08pm    
Here is something really interesting for you: http://codesamples.codeplex.com/releases/view/88717

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