From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id A78117EFCB for ; Wed, 19 Feb 2014 12:47:26 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=pra; client-ip=212.227.17.8; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=mailfrom; client-ip=212.227.17.8; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of postmaster@moutng.kundenserver.de designates 212.227.17.8 as permitted sender) identity=helo; client-ip=212.227.17.8; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="postmaster@moutng.kundenserver.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At0BAL+YBFPU4xEIlGdsb2JhbABZgz7ATIEcFg4BAQEBBwsLCRIqgiUBAQQBVSQFCwtGSQENBhMJh3QMCc1GF4kjhRsmB4IvD4F6BI8SilCFEAWPCw X-IPAS-Result: At0BAL+YBFPU4xEIlGdsb2JhbABZgz7ATIEcFg4BAQEBBwsLCRIqgiUBAQQBVSQFCwtGSQENBhMJh3QMCc1GF4kjhRsmB4IvD4F6BI8SilCFEAWPCw X-IronPort-AV: E=Sophos;i="4.97,505,1389740400"; d="asc'?scan'208";a="49644993" Received: from moutng.kundenserver.de ([212.227.17.8]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Feb 2014 12:47:26 +0100 Received: from office1.lan.sumadev.de (dslb-088-069-157-196.pools.arcor-ip.net [88.69.157.196]) by mrelayeu.kundenserver.de (node=mreue007) with ESMTP (Nemesis) id 0LdgKV-1WyoEz2cfj-00j2tz; Wed, 19 Feb 2014 12:47:22 +0100 Received: from [192.168.10.100] (ip-81-210-158-183.unitymediagroup.de [81.210.158.183]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id CE943DC270; Wed, 19 Feb 2014 12:47:21 +0100 (CET) Message-ID: <1392810435.20171.6.camel@e130> From: Gerd Stolpmann To: Johannes Kanig Cc: caml-list@inria.fr Date: Wed, 19 Feb 2014 12:47:15 +0100 In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-W2Sb8uTEwGYyd2MgB1AV" X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 X-Provags-ID: V02:K0:4ezzv46oIbRVgjwnk6H3UPtYtUHfB9e5sFquD8JLmb4 gHnpT3F6gAQ3l3eBW5PNL7kNh02SVOXFs3BA5bgZZS5JbFT5kx NdFt0P4H3D7A94R4ISzJkVf9yr32qf2ZPVVgreLYv8ThEdJP8K /LJZuck7ogaGCQyuSF00AX1A7p4IlsHHURHPsnqx6+BxoHH/Mk IshinjHdij317O+BbI+G83a5/Y6WDT6ZZkmFzf3g/8fLSi6Uev sKwcgOg0BM8uAL9Mch+WAqgkIwvrZ8MWE6oNTob9UzBTrAOIJG ARCc8MJqaM1YqNxer/YX0pU9VJdzgcxLT47srmCoLbz0c0oYDl loNJZ7VNOWxTktWgY7n9iRwzE1rZj7CEBbEiSzM6T Subject: Re: [Caml-list] unix domain sockets on windows --=-W2Sb8uTEwGYyd2MgB1AV Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Am Mittwoch, den 19.02.2014, 09:43 +0100 schrieb Johannes Kanig: > Hello, >=20 > I wonder if unix domain sockets are supposed to be supported on > Windows? Here is a session with the ocaml toplevel (4.01.0) on my > Windows machine: >=20 > # #load "unix.cma";; > # Unix.socket Unix.PF_UNIX Unix.SOCK_STREAM 0;; > Exception: Unix.Unix_error (Unix.EUNKNOWNERR 0, "socket", ""). >=20 > Is that expected? Replacing PF_UNIX with PF_INET works. There are no Unix-domain sockets on Windows. If you need local sockets, there are two possibilities: 1) Use Internet sockets on the loopback device (127.0.0.1) 2) Use named pipes, which work in a similar way as sockets, but have a quite different API (btw, "named pipes" on Windows are fundamentally different to "named pipes" on Unix). There are bindings for these in Ocamlnet (Netsys_win32 module, http://projects.camlcity.org/projects/dl/ocamlnet-3.7.3/doc/html-main/Netsy= s_win32.html). In any case, I'd recommend you read some background knowledge about the possibilities of the OS, because there are some hidden traps. Gerd > On a related note, the "error message" provided by the unix module is > a bit funny: >=20 > # Unix.handle_unix_error (Unix.socket Unix.PF_UNIX Unix.SOCK_STREAM) 0;; > C:\OCaml\bin\ocaml.exe: "socket" failed: The operation completed successf= ully. >=20 > Thanks in advance, >=20 > Johannes > --=20 > Johannes Kanig >=20 --=20 ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------ --=-W2Sb8uTEwGYyd2MgB1AV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAABAgAGBQJTBJnDAAoJEAaM4b9ZLB5Tw+wH/iIr9X/BZo8Ck0wfrdG5OUGs wglPEDFJ/nA3sCg0hjiC5qQgB5yqQ11RW+db0QYsUvzkHj1RE9hucTp8W3CS72BC HRhwhSg+dLbl2q1UTnUJtebY34M6f6cC9a2dsK5rzTzWQ6c2K2UobBnUaV2qQWAv g0a2TUTzv+X+Mko2sZ2QRQUfG5ncRiNJIkziI2i384nBZz9QfdG1MIVmvkyQp8Gg 9gaDWUPP/SNx42dFg/PfUOlAcYyvNi9WdPRzmz4LPKLQYwfM4mBGMMdeW8LCx43D uv3ggP40CywVjMy0jrhobwLRbVF6cDRrR0/2JQop6nvZZv3K+cccEJkKC907nTE= =KpyY -----END PGP SIGNATURE----- --=-W2Sb8uTEwGYyd2MgB1AV--