fix socket option setting on .net api