UnixSock
structure
signature UNIX_SOCK
(* OPTIONAL *)
structure UnixSock
:> UNIX_SOCK (* OPTIONAL *)
This structure is used to create sockets in the Unix address family. This structure is only present when the underlying operating system supports Unix-domain sockets.
Binding a name to a Unix-domain socket with bind
causes a socket file to be created in the filesystem. This file is not removed when the socket is closed; OS.FileSys.remove
must be used to remove the file. The usual filesystem access-control mechanisms are applied when referencing Unix-domain sockets; e.g., the file representing the destination of a connect
or sendVec
must be writable.
type unix
type 'sock_type sock = (unix, 'sock_type) Socket.sock
type 'mode stream_sock = 'mode Socket.stream sock
type dgram_sock = Socket.dgram sock
type sock_addr = unix Socket.sock_addr
val unixAF : Socket.AF.addr_family
val toAddr : string -> sock_addr
val fromAddr : sock_addr -> string
structure Strm : sig
val socket : unit -> 'mode stream_sock
val socketPair : unit
-> 'mode stream_sock
* 'mode stream_sock
end
structure DGrm : sig
val socket : unit -> dgram_sock
val socketPair : unit -> dgram_sock * dgram_sock
end
type unix
type 'sock_type sock = (unix, 'sock_type) Socket.sock
type 'mode stream_sock = 'mode Socket.stream sock
type dgram_sock = Socket.dgram sock
type sock_addr = unix Socket.sock_addr
val unixAF : Socket.AF.addr_family
toAddr s
fromAddr addr
structure Strm
val socket : unit -> 'mode stream_sock
SysErr
if there are too many sockets in use.
val socketPair : unit
-> 'mode stream_sock * 'mode stream_sock
Posix.IO.pipe
function in that the returned sockets are connected, but unlike pipe
, the sockets are bidirectional. It raises SysErr
if there are too many sockets in use.
structure DGrm
val socket : unit -> dgram_sock
SysErr
if there are too many sockets in use.
val socketPair : unit -> dgram_sock * dgram_sock
SysErr
if there are too many sockets in use.
GenericSock
,INetSock
,Socket
Generated October 02, 2003
Last Modified June 5, 1998
Comments to John Reppy.
This document may be distributed freely over the internet as long as the copyright notice and license terms below are prominently displayed within every machine-readable copy.
Copyright © 2003 AT&T and Lucent Technologies. All rights reserved.
Permission is granted for internet users to make one paper copy for their
own personal use. Further hardcopy reproduction is strictly prohibited.
Permission to distribute the HTML document electronically on any medium
other than the internet must be requested from the copyright holders by
contacting the editors.
Printed versions of the SML Basis Manual are available from Cambridge
University Press.
To order, please visit
www.cup.org (North America) or
www.cup.cam.ac.uk (outside North America). |