fixed setsockopt bugs
fixed indentation