FLEx/Flash and VB

I have a project I am working on and I have solved it using VB script. I would like to add a flash front end though. All I want is too machines to talk over tcp/ip. Here’s what I want to do. I have machine a and b. On machine a I want there to be a flash/flex app that will talk to machine b (basically send it a variable). On machine b I need something that is listening to machine a and will also send a response. The app on machine b needs to run commands through a command prompt such as taskill, copyFile, launch a shortcut, etc.

I can set up machine a fine. I have been playing around with the xmlsocket object. It is machine b where I am lost. I wanted to have a flash/flex app there too but apparently flash cant accept an incoming socket. So I guess now I need to write a server app.

Basically what is the best way to get these two machines to talk and how can I send commands to a command prompt from flash/flex?

Thanks for the help