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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (download) (annotate)
Thu Jun 1 18:34:03 2000 UTC (19 years, 3 months ago) by monnier
File size: 1079 byte(s)
bring revisions from the vendor branch to the trunk
(* cml-inet-sock.sml
 *
 * COPYRIGHT (c) 1996 AT&T Research.
 *)

structure CML_INetSock : INET_SOCK =
  struct
    type inet = INetSock.inet

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

    type sock_addr = inet Socket.sock_addr

    val inetAF = INetSock.inetAF

    val toAddr = INetSock.toAddr
    val fromAddr = INetSock.fromAddr
    val any = INetSock.any

    structure UDP =
      struct
	fun socket () =
	      CML_GenericSock.socket (inetAF, Socket.SOCK.dgram)
	fun socket' proto =
	      CML_GenericSock.socket' (inetAF, Socket.SOCK.dgram, proto)
      end

    structure TCP =
      struct
	fun socket () =
	      CML_GenericSock.socket (inetAF, Socket.SOCK.stream)
	fun socket' proto =
	      CML_GenericSock.socket' (inetAF, Socket.SOCK.stream, proto)
      (* tcp control options *)
	fun getNODELAY (PreSock.CMLSock{sock, ...}) =
	      INetSock.TCP.getNODELAY sock
	fun setNODELAY (PreSock.CMLSock{sock, ...}, flg) =
	      INetSock.TCP.setNODELAY(sock, flg)
      end

  end

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