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

SCM Repository

[smlnj] Annotation of /sml/trunk/src/cml/src/Sockets/cml-inet-sock.sml
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (view) (download)

1 : monnier 2 (* cml-inet-sock.sml
2 :     *
3 :     * COPYRIGHT (c) 1996 AT&T Research.
4 :     *)
5 :    
6 :     structure CML_INetSock : INET_SOCK =
7 :     struct
8 :     type inet = INetSock.inet
9 :    
10 :     type 'a sock = (inet, 'a) Socket.sock
11 :     type 'a stream_sock = 'a Socket.stream sock
12 :     type dgram_sock = Socket.dgram sock
13 :    
14 :     type sock_addr = inet Socket.sock_addr
15 :    
16 :     val inetAF = INetSock.inetAF
17 :    
18 :     val toAddr = INetSock.toAddr
19 :     val fromAddr = INetSock.fromAddr
20 :     val any = INetSock.any
21 :    
22 :     structure UDP =
23 :     struct
24 :     fun socket () =
25 :     CML_GenericSock.socket (inetAF, Socket.SOCK.dgram)
26 :     fun socket' proto =
27 :     CML_GenericSock.socket' (inetAF, Socket.SOCK.dgram, proto)
28 :     end
29 :    
30 :     structure TCP =
31 :     struct
32 :     fun socket () =
33 :     CML_GenericSock.socket (inetAF, Socket.SOCK.stream)
34 :     fun socket' proto =
35 :     CML_GenericSock.socket' (inetAF, Socket.SOCK.stream, proto)
36 :     (* tcp control options *)
37 :     fun getNODELAY (PreSock.CMLSock{sock, ...}) =
38 :     INetSock.TCP.getNODELAY sock
39 :     fun setNODELAY (PreSock.CMLSock{sock, ...}, flg) =
40 :     INetSock.TCP.setNODELAY(sock, flg)
41 :     end
42 :    
43 :     end

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