setsockopt throwing invalid argument error