The Standard ML Basis Library


The GenericSock structure


Synopsis

signature GENERIC_SOCK  (* OPTIONAL *)
structure GenericSock :> GENERIC_SOCK  (* OPTIONAL *)

Implementations may provide the GenericSock structure as a way to provide access to additional address families and socket types (beyond those supported by INetSock and UnixSock).


Interface

val socket : Socket.AF.addr_family * Socket.SOCK.sock_type
               -> ('af'sock_type) Socket.sock
val socketPair : Socket.AF.addr_family
                   * Socket.SOCK.sock_type
                   -> ('af'sock_type) Socket.sock
                   * ('af'sock_type) Socket.sock
val socket' : Socket.AF.addr_family
                * Socket.SOCK.sock_type
                * int -> ('af'sock_type) Socket.sock
val socketPair' : Socket.AF.addr_family
                    * Socket.SOCK.sock_type
                    * int
                    -> ('af'sock_type) Socket.sock
                    * ('af'sock_type) Socket.sock

Description

socket (af, st)
creates a socket in the address family specified by af and the socket type specified by st, with the default protocol.

socketPair (af, st)
creates an unnamed pair of connected sockets in the address family specified by af and the socket type specified by st, with the default protocol.

socket' (af, st, i)
creates a socket in the address family specified by af and the socket type specified by st, with protocol number i.

socketPair' (af, st, i)
creates an unnamed pair of connected sockets in the address family specified by af and the socket type specified by st, with protocol number i.

See Also

INetSock, NetProtDB, Socket, UnixSock

Discussion

Question:

addressFamilies : unit -> Socket.AF.addr_family list?

socketTypes : unit -> Socket.SOCK.sock_type?


[ Top | Parent | Contents | Index | Root ]

Generated April 12, 2004
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 © 2004 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).