Renamed sockets to match C example and formatted code
Merge pull request #390 from alexpana/master

Renamed sockets to match C example and formatted code