TCP socket in test