Python/C/Java Socket Conmmunications