fixing the source code
fixinfg the local connect idea on ofsocket and revert to new API