Sets up pcb to connect to the remote host indicated by ipaddr on port port and sends the initial SYN segment which opens the connection.
The tcp_connect() function returns immediately; it does
not wait for the connection to be properly set up. Instead, it will call the
connected() function specified
as the fourth argument when the connection is established. If the connection
could not be properly established, either because the other host refused the
connection or because the other host didn't answer, the
connected() function will be
called with its err argument set accordingly.