2

I have a C# command line app (the server), that is executed by another app (the client). It simply does a command and shuts down. I'm trying to convert this "run and shut" method to a "constantly running" windows forms. I'll use sockets as a way for the client app to talk to the server in C#. My client app can talk in sockets, but I need a quick and simple way to integrate socket server functionality in C#.

I've tried to work with the following, but they all seem overly complex to integrate. Do you have any idea how to use these effectively, or any simple socket server component in C#?

These seem quite robust, but complex:

These seem quite promising (no idea how limited/functional they are):

1
  • This sounds like a problem that could be solved efficently with something like 0mq Commented Dec 21, 2011 at 17:04

2 Answers 2

4

They may seem complex but the ASync Socket stuff isn't too bad and there are lots of examples on how to implement it. Being Asynchronous makes it easy to handle multiple connections simultaneously so I'd recommend having another look at it.

I've not used it myself but the TCPListener Class looks simpler to implement and comes with some examples on it's use.

Sign up to request clarification or add additional context in comments.

1 Comment

1

If you're looking for something which you can easily use to get your server and client to talk to one another check out networkComms.net and in particular the short example demonstrating the most basic functionality here, hopefully not overly complex!

1 Comment

The second link seems dead. I tried creating a new BitBucket account, and the link says "permission denied."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.