TCP connect and bind check whether the address supplied is valid straight away

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>