I am a Ocaml beginner coming from languages like C and Java and I have a question on a bit of
Ocaml code that I found on GitHub - mirage/ocaml-cohttp: An OCaml library for HTTP clients and servers using Lwt or Async and which I don’t quite understand.
I hope, this isn’t going to be too embarrassing.
I found this code example in section " Basic Server Tutorial":
let tcp_config =
Conduit_lwt.TCP.sockaddr = Unix.ADDR_INET (Unix.inet_addr_loopback, 8000);
capacity = 40;
from my limited understanding, this looks like a definition of a variable of some record type.
What confuses me is the part
Conduit_lwt.TCP.sockaddr = …
This does not seem to be a field name of this record, but something else.
Can anyone enlighten me, what this is about?
I don’t necessarily want to know about the cohttp library, I’m just wondering how to parse this syntax.