Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/cml/src/Sockets/cml-generic-sock.sml
ViewVC logotype

View of /sml/trunk/src/cml/src/Sockets/cml-generic-sock.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (download) (annotate)
Sat Oct 4 23:33:09 1997 UTC (21 years, 9 months ago) by monnier
File size: 964 byte(s)
Initial revision
(* cml-generic-sock.sml
 *
 * COPYRIGHT (c) 1996 AT&T Research.
 *)

structure CML_GenericSock : GENERIC_SOCK =
  struct

  (* returns a list of the supported address families; this should include
   * at least:  Socket.AF.inet.
   *)
    val addressFamilies = GenericSock.addressFamilies

  (* returns a list of the supported socket types; this should include at
   * least:  Socket.SOCK.stream and Socket.SOCK.dgram.
   *)
    val socketTypes = GenericSock.socketTypes

  (* create sockets using default protocol *)
    fun socket arg = PreSock.mkSock(GenericSock.socket arg)
    fun socketPair arg = let
	  val (s1, s2) = GenericSock.socketPair arg
	  in
	    (PreSock.mkSock s1, PreSock.mkSock s2)
	  end

  (* create sockets using the specified protocol *)
    fun socket' arg = PreSock.mkSock(GenericSock.socket' arg)
    fun socketPair' arg = let
	  val (s1, s2) = GenericSock.socketPair' arg
	  in
	    (PreSock.mkSock s1, PreSock.mkSock s2)
	  end

  end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0