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

SCM Repository

[smlnj] Diff of /sml/trunk/src/smlnj-lib/INet/sock-util.sml
ViewVC logotype

Diff of /sml/trunk/src/smlnj-lib/INet/sock-util.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 409, Fri Sep 3 00:21:52 1999 UTC revision 1381, Wed Sep 17 21:28:41 2003 UTC
# Line 55  Line 55 
55                    PC.wrap (scanName, ServName),                    PC.wrap (scanName, ServName),
56                    PC.wrap (Int.scan StringCvt.DEC, PortNumber))))) getc strm                    PC.wrap (Int.scan StringCvt.DEC, PortNumber))))) getc strm
57    
58        val addrFromString = StringCvt.scanString scanAddr
59    
60      exception BadAddr of string      exception BadAddr of string
61    
62      fun resolveAddr {host, port} = let      fun resolveAddr {host, port} = let
# Line 111  Line 113 
113    (* send the complete contents of a vector *)    (* send the complete contents of a vector *)
114      fun sendVec (sock, vec) = let      fun sendVec (sock, vec) = let
115            val len = Word8Vector.length vec            val len = Word8Vector.length vec
116            fun send i = Socket.sendVec (sock, {buf=vec, i=i, sz=NONE})            fun send i = Socket.sendVec (sock,
117                                           Word8VectorSlice.slice (vec, i, NONE))
118            fun put i = if (i < len)            fun put i = if (i < len)
119                  then put(i + send i)                  then put(i + send i)
120                  else ()                  else ()
# Line 124  Line 127 
127    (* send the complete contents of an array *)    (* send the complete contents of an array *)
128      fun sendArr (sock, arr) = let      fun sendArr (sock, arr) = let
129            val len = Word8Array.length arr            val len = Word8Array.length arr
130            fun send i = Socket.sendArr (sock, {buf=arr, i=i, sz=NONE})            fun send i = Socket.sendArr (sock,
131                                           Word8ArraySlice.slice (arr, i, NONE))
132            fun put i = if (i < len)            fun put i = if (i < len)
133                  then put(i + send i)                  then put(i + send i)
134                  else ()                  else ()

Legend:
Removed from v.409  
changed lines
  Added in v.1381

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