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/branches/primop-branch/src/smlnj-lib/INet/sock-util.sml
 [smlnj] / sml / branches / primop-branch / src / smlnj-lib / INet / sock-util.sml

# Diff of /sml/branches/primop-branch/src/smlnj-lib/INet/sock-util.sml

revision 1470, Mon Mar 29 22:45:55 2004 UTC revision 1471, Mon Mar 29 22:45:55 2004 UTC
# Line 113  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 126  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.1470 changed lines Added in v.1471