Pinging down NetMeeting data channels

Back in 1999 Darren came up with a cunning plan to make lots of money. The plan was ‘device control over the internet’… In summary, we didn’t.

Ideally this plan required an audio/visual link as well as a device control link. I decided that doing the audio and video ourselves was too much work and that we’d be better off using the NetMeeting data channel for our device control. We would get the audio/video stuff for free and wouldn’t have to worry about things like cameras and microphones. Our intended devices would give us enough to worry about as it was…

So I set out to put a prototype together. I did the prototype in 15 days, only working a couple of hours of ‘free time’ per day. As is my way, I approached learning the NetMeeting COM API by wrapping it. We were intending to write all of the code in C++ and it was easier to have the COM objects wrapped so that they played nicely in C++ land.

Once I’d wrapped several of the NetMeeting COM objects I decided to make a hybrid C++ object that represented a NetMeeting DataPipe. This object presented an ’easy to use’ interface into the NetMeeting data channel. It wrapped up INmManagerNotify, INmConferenceNotify and INmChannelDataNotify and provided virtual function callbacks for connection, disconnection, data flow and errors. The pipe represented a many to one connection over a NetMeeting data channel. All users in a conference could communicate over the data pipe and the wrapper class dealt with all the nastiness of setting up the connection and connecting.

I seem to remember that it was a pain to work out when you could create a data channel connection. You had to wait for the audio and video channels to come up and there was no single callback that indicated that now was a good time to connect…

Anyway, here’s the code for my DataPipe test program. It’s a simple Ping program that runs over a NetMeeting data channel and allows you to ping all other users in the conference that also have the ping program running. Run the program on two machines. Initiate a NetMeeting connection between the two machines and set the Ping ‘Frequency’ value to 1 (I think it’s seconds…) and hit apply.

The actual device control program became our WebRemote and ControlRemote products, but more on that, and more code, in another post…