views:

18

answers:

1

I understand how I can use a raw socket to listen to a server application and recieve information but I need an easy to access API and I am very familiar with REST.
Is there a way to push (not by using long pooling) data using a WCF service?
Here's my idea of how things should happen, at least at the begining:

  1. The client accesses a URI with it's access parameters (ip, port, apikey).
  2. The server responses with success/failure.
  3. The server opens a socket for each channel with the client's details.
  4. The server accesses a URI indicating that all channels are now streaming.

But how do I wrap the client or the server socket to access a URI?

Edit:
Maybe I should open a socket that notifies about changes on a channel and on the client side require that it will listen and raise the event accordingly.
This is not a very generic solution isn't it?

+1  A: 

You should look into the Net.TCP binding, as described by Tomek (one of the WCF team members) here. You use it more-or-less like you would use the HTTP Duplex binding (i.e., the HTTP Long Poll), but it's much, much faster. It's still more complicated than REST, but it's dramatically easier than sockets, and I don't think you'll find a REST-type solution that does what you need.

Ken Smith