TCP Server in WCF

sakulk

Recruit
Hi all,
My problem is as follows:
I have a TCP client written in C# that uses .Net socket to communicate with the native TCP Server that just listens on an ip and port number.
My requirement is to migrate the TCP Server into WCF , please note client's code is not under my control.
Following things I have read and tried:
1. I have read that to achieve this I need to write custom channels with binding and transport.
2. I have created one simple WCF service with dummy service contract and hosted it with address and port number. Now when I open the native client that is just sending raw bytes to the server, it says connection found at the service's IP and sent 19 bytes then error occurs. My question is , if the native client is able to send the bytes to the server, how I can see it in WCF service , I mean at which layer because even after writing custom transport, the breakpoint doesn't hit on Request function. I am totally clueless on this.

However I still have following questions on the feasibility of the project:
1. Even if we write custom channels and transport, can we make WCF service listen to specific IP and port just like TCP server . Can WCF service wait for just bytes?
2. Can the client invoke the WCF service without using service contract or methods, I believe the only way to interact with the WCF services are method calling?

Let me know if I am in the right direction or some pointers to books where I can read about and most importantly if its feasible( do not consider performance aspect).Please provide the clear picture on how I can see the bytes in WCF server.

Thanks a lot,
Sakulk
 
Back
Top