المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Dynamic Actions based on dynamic command list



C# Programming
08-21-2009, 12:47 PM
Hi all,

Okay, lets try to explain what I want to accomplish...

I have a multi threaded TCP/IP server. When a client connects and sends data to the server, the server responds with a 'ACK'. But I would like to be more specific with the client(s) request.

Lets say the client sends a command (which can be anything/dynamic) 'EVENT'. Now when the server receives this command, it must recognize it, and execute the code that is specific to the EVENT command. (maybe by using dynamic delegates or Action http://www.barakasoft.com/script/Forums/Images/smiley_confused.gifhttp://www.barakasoft.com/script/Forums/Images/smiley_confused.gif)

The client must be able to have a variety of commands that it can send to the server ... this is already in place. The issue is, how can I dynamically accommodate the ever changing command(s) that the client(s) can send to the server? So that the server can execute the correct code based on the client(s) request?

I really hope that this makes sense.
Many thanks in advance.

kind regards,



The only programmers that are better C# programmers, are those who look like this -> http://www.barakasoft.com/script/Forums/Images/alien.gif


http://www.barakasoft.com/script/Forums/Images/smiley_smile.gifProgramm3r
My Blog: ^_^ (http://www.codeproject.com/script/profile/whos_who.asp?msg=1917620&id=2823228#xx1917620xx)