IPC between MUSHClient and C# application over sockets?

Posted by Zolomon on Fri 13 Apr 2012 11:37 AM — 3 posts, 14,994 views.

#0
Hi!

I'm working on a fun little project where I have connected an Xbox360 Kinect to my computer and can use its SDK for speech recognition.

I have this working perfectly - however, I don't know how I can write a EDIT: socket listening loop in Lua that can sit non-blockingly and wait for commands from my C# application.

I am not sure if this is the best approach.

The flow I'm trying to achieve is something like this:

1. Say a command out loud and recognize it
2. Send command to MUSHClient
3. Retrieve command on MUSHClient's side
4. Parse command
5. Execute command/associated script

I have managed to write a connect & disconnect script but I can't solve the non-blocking loop part.

Any suggestions?
Amended on Fri 13 Apr 2012 01:32 PM by Zolomon
Australia Forum Administrator #1
I think LuaSocket has a listen feature, where you can check for input without blocking, not sure if that will work in your case.
#2
I realized that I don't need to create a socket - I can just create a new world that can connect to my server and work as proxy for my main world.