Hey all,
I just got a networking socket workaround in prototype state. I have an external C++ program open a namedPipe and have sketchups ruby API open it as a normal file.
So I have a workable method for passing data back and forth. I was planning on using it strictly for my own goals meaning I don't need generic socket control...but if people are interested enough I would be willing to put work into a SIMPLE generic socket interface and of course I would open source the C++ bridge.
--Interaction and details are below--
IE.
C++ program opens namedPipe "\.\pipe\networkBridge" and waits for commands.
Sketchup Ruby API opens file "\.\pipe\networkBridge" and sends commands
Commands are something like:
TCPOpen SOCKET_ID 192.168.1.27 8000
TCPSend SOCKET_ID DATADATADATA
UDPSend 192.168.1.27 9000 DATADATADATA
The Bridge will automatically write any information from the sockets to the named pipe and the Ruby program must suck it in like drinking from a firehose. There will be a format for incoming data so the ruby program can tell what event happened on which socket.
Something like:
SOCKET_ID EVT_ID EVENT_DATA