split tsSocket::connect into prepare and connect