Click here to Skip to main content
15,887,340 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to create a RESTful web service that can pass information back and forth with a TCP/IP client. I figured I would do this by some sort of event handler, with shared resources. What I am having trouble with is grasping how to create the TCP client thread from within the web service or if it's created elsewhere, how do I maintain those shared resources between the two?

Basically, what I'm looking for is this kind of program flow: The TCP/IP client starts the connection to the server and waits. The web service recieves an HTTP request, which it then passes to the TCP client. The client processes the request, and then passes a response to the web service, which would send it back out as a response to the original request.

any information or tips is greatly appreciated.
Posted

1 solution

Itz possible by adding an endpoint in WCF service as:

CSS
<endpoint address="net.tcp://localhost:8008/MyService"

  binding="netTcpBinding"

  contract="MyServer.MyService.IService" />


Now, TCP client can consume this end point for TCP connectivity with service.
 
Share this answer
 

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