Skip to content

basho-labs/gen_utp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gen_utp: an API and driver for the uTP protocol

Description

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 listen and accept
  • client connect
  • both list and binary modes for incoming messages
  • active settings of true, false, and once
  • controlling processes
  • setopts and getopts calls
  • IPv4 and IPv6
  • server accept can be async, or blocking with optional timeout
  • recv with 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.

About

API and driver for the Micro Transport Protocol (uTP)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published