File: aux.ml

package info (click to toggle)
syslog-ocaml 1.4-6
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 260 kB
  • ctags: 173
  • sloc: ml: 414; makefile: 36; ansic: 26
file content (10 lines) | stat: -rw-r--r-- 364 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
type msg_flag = MSG_OOB | MSG_DONTROUTE | MSG_PEEK | MSG_NOSIGNAL

external unsafe_send :
  Unix.file_descr -> string -> int -> int -> msg_flag list -> int
                                  = "aux_send"

let send fd buf ofs len flags =
  if ofs < 0 || len < 0 || ofs > String.length buf - len
  then invalid_arg "Unix.send"
  else unsafe_send fd buf ofs len flags