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-unix-sock.sml
ViewVC logotype

View of /sml/trunk/src/cml/src/Sockets/cml-unix-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: 1124 byte(s)
Initial revision
(* cml-unix-sock.sml
 *
 * COPYRIGHT (c) 1996 AT&T Research.
 *)

structure CML_UnixSock : UNIX_SOCK =
  struct
    structure SOCK = Socket.SOCK

    type unix = UnixSock.unix

    type 'a sock = (unix, 'a) Socket.sock
    type 'a stream_sock = 'a Socket.stream sock
    type dgram_sock = Socket.dgram sock

    type sock_addr = unix Socket.sock_addr

    val unixAF = UnixSock.unixAF
    val toAddr = UnixSock.toAddr
    val fromAddr = UnixSock.fromAddr

    structure Strm =
      struct
	fun socket () = CML_GenericSock.socket (unixAF, SOCK.stream)
	fun socket' proto = CML_GenericSock.socket' (unixAF, SOCK.stream, proto)
	fun socketPair () = CML_GenericSock.socketPair (unixAF, SOCK.stream)
	fun socketPair' proto = CML_GenericSock.socketPair' (unixAF, SOCK.stream, proto)
      end

    structure DGrm =
      struct
	fun socket () = CML_GenericSock.socket (unixAF, SOCK.dgram)
	fun socket' proto = CML_GenericSock.socket' (unixAF, SOCK.dgram, proto)
	fun socketPair () = CML_GenericSock.socketPair (unixAF, SOCK.dgram)
	fun socketPair' proto = CML_GenericSock.socketPair' (unixAF, SOCK.dgram, proto)
      end

  end

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