add receive timeout argument
pos_infin does not work that way :/
fix sync_receive packet ptr NULL error.