Defining callbacks to receive external commands?

Not really Thomas. Reading the above, I’m afraid I can’t really help.
I was trying to use named pipes to communicate between a ruby c extension in Sketchup and an an external console application. Never really tried sockets, maybe I should.
Before that I started with popen3 to launch my external app and get IO handles to communicate over. It all worked fine on mac, but it drove me nuts on windows. Seems like ruby spawn is a different beast on non posix platforms like windows. Tried alternative implementations found on github… Some worked on pure ruby on windows, non from within Sketchup/ruby.
I’m still looking for a decent solution on windows. Currently using popen3 on mac (very easy pure ruby, no issues) and a dirty file based hackish alternative on the windows version. It does the job, but it’s ugly.