Fixed TCP  code by denhua  for compatibility with current version.

Fixed TCP  code by denhua  for compatibility with current version.