fix ip address check

add ip address.port check in some sample programming.