tcp message pushing and receiving in bash