Changed some modules to compile as C
pgm socket functions