GSoC/GCI Archive
Google Code-in 2013 Copyleft Games

PySoy: C libsrtp Example

completed by: Matt Habel

mentors: Anthus Williams, Arc Riley, David Czech

One of our long-term goals is to have PySoy working with a HTML/5 client using WebGL, WebRTC, etc. Toward that end we're making design modifications such as migrating to OpenGL ES 2.0 (which WebGL is based on) and implementing the more CPU intensive physics calculations as shaders. We will also need to make sure our networking is compatible with WebRTC.

In the past we've used raw UTP for game networking. WebRTC does not support raw UDP, only SRTP, which offers some improvements over UDP we can utilize such as data prioritization and channeling.

There's a library called libsrtp which should make it relatively painless to use SRTP. Integrating it into PySoy would be much easier if we had a simple working example to base it on.

Using example code found in the documentation and elsewhere on the web, write a simple libsrtp example which passes arbitrary data between two programs on the same network (potentially same computer) in C. Upload this to one of our Mercurial repositories under the GNU AGPLv3 license so code from it can be reused.

This is not expected to work with WebRTC itself since that also requires ICE negotiation which is beyond the scope of this task.

While working on this task you should join and remain in #PySoy on Freenode to get help, feedback, and guidance from mentors and other developers.

When you've done, commit your work and post the resulting changeset url to this task.