Normally a WCF TCP channel will make a connect to a host then allow you to make method calls over it.
I would like to have a service which makes outbound connections to the clients, but once the connection has been made then clients would be able to make method calls against my service as if it were a conventional connection.
I suspect that this is some kind of a custom channel but wondered if a) this had already been done b) whether there were any pitfalls I should try and avoid
Note - that I'm not talking about a duplex style callback, but rather the client and server going on to have a conventional style conversation where the server responds to client requests through the standard wcf dispatcher - only the originator of the underlying tcp connection is the server rather than the client.
Siz suggests it is as simple as using a duplex contract. To expand the requirements slightly: a) The client is prohibited from making connections to the server. So if the duplex channel makes a seperate tcp connection then this won't work. I think from my tests that it doesn't but shares the originating the connection under tcp (can anyone confirm?)
b) There are multiple services on the server that the client needs to call so the "Callback contract" mechanism of setting up the reverse connection will be awkward as there will need to be many "register" style calls to get them all set up. Ideally I would like to set up multiple services all at once - is this possible using this approach?