Modified program to add socket code (for QuadPi network) and replace int
logic with shorts to minimize congestion.