Priority Queue Implementation In Java Using Sockets In Python