add lowlevel socket support for FreeBsd nad amendments for windows's socket