简体   繁体   中英

WCF or HttpListener

I'm working on a Windows Forms application that needs to be a server that can get commands from Android, iPhone, Windows Phone and even from a website. I'll also make a Windows client to connect and send information.

I need to send some strings but mostly booleans to the server and the response will just be a string (Successful, Unsuccessful).

I have worked with HttpListener but if I google around I can see people talkk about WCF (something that I never have used).

My question is now - What would YOU recommend? Pros and Cons? Thanks in advance.

WCF is a fairly large communication framework that has a lot of facilities for security, authentication, etc. Very useful if you need it. If you are doing .NET on both side, then WCF is fairly simple to get up and running, but I have a feeling it's more complex if you're coming from non .NET and/or non ws-* style clients.

If you're just doing a single, simple, call then WCF is probably too heavy. However, make sure you are handling all the retrying, security, etc yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM