can write data to tcp server but cannot read back