http://developer.mbed.org/teams/mbed/code/mbed-rpc/#33e21ae4d434