tcp/udp message pushing and receiving in bash