Sample code for XNIO 3.x