gen_utp provides an API and driver for the
Micro Transport Protocol
(uTP), similar to gen_tcp and gen_udp. It attempts to provide a
TCP-like API with listen, accept, and connect calls, but due to the
nature of the underlying
libutp library the semantics are
not identical.
gen_utp provides the following support:
- server
listenandaccept - client
connect - both
listandbinarymodes for incoming messages activesettings oftrue,false, andonce- controlling processes
setoptsandgetoptscalls- IPv4 and IPv6
- server
acceptcan be async, or blocking with optional timeout recvwith optional timeout
Currently, the server listen call differs from TCP in that it doesn't
store a backlog; if async accept is not enabled and there are no waiting
acceptors, the listen socket just drops incoming connection
attempts. Hopefully this shortcoming will be fixed in the future.
Look at the tests under test/gen_utp_tests.erl for usage examples. More
documentation to follow, and more tests are needed as well.