/sendudp.ml Secret
Created
July 27, 2017 09:49
Sending a UDP packet is… complex?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open Core.Std | |
open Async.Std | |
(* let buf = Iobuf.of_string "hello hest\n" *) | |
let addr = Unix.Inet_addr.of_string "127.0.0.1" | |
let socket_addr = Unix.Socket.Address.Inet.create addr ~port:2115 | |
let _ = | |
let open Or_error.Monad_infix in | |
Udp.sendto () >>| fun fd iobuf addr -> | |
(* ??? *) | |
Deferred.unit |
copy
commented
Jul 27, 2017
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment