From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA03916; Mon, 13 Jan 2003 23:51:44 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA04232 for ; Mon, 13 Jan 2003 23:51:44 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from web20010.mail.yahoo.com (web20010.mail.yahoo.com [216.136.225.73]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id h0DMpg519939 for ; Mon, 13 Jan 2003 23:51:43 +0100 (MET) Message-ID: <20030113225141.23405.qmail@web20010.mail.yahoo.com> Received: from [24.163.168.219] by web20010.mail.yahoo.com via HTTP; Mon, 13 Jan 2003 14:51:41 PST Date: Mon, 13 Jan 2003 14:51:41 -0800 (PST) From: tom hawkins Subject: [Caml-list] Setting unix socket options. To: caml-list@inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello all, I just started playing with sockets through Ocaml, but I'm having difficultly setting options on a socket. I can get the options just fine (getsockopt), but when I try to set an option I get "permission denied". Here's my test code: open Unix;; let s = socket PF_INET SOCK_STREAM 0;; let f () = setsockopt s SO_DEBUG true;; let main () = if not (getsockopt s SO_DEBUG) then begin print_string "DebugOff"; print_newline () end; handle_unix_error f ();; main ();; Compiles fine. Running produces this: DebugOff ./server: "setsockopt" failed: Permission denied What am I doing wrong? Thanks, Tom __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners