UDT Tutorial: Introduction

Introduction to programming with UDT

UDT is a C++ library. The two classes exposed to application programmers are CUDT and CUDTException.

Using UDT is even simpler than socket programming. Like sockets, UDT needs first to bind to a port and/or IP address (using the open method), and then listens to a client (as a server) or connects to a server (as a client) to construct the connection. The only difference is that the UDT listen can only accept one connection, not like TCP listen, which can accept multiple client requests.

The parameters, or options, can be tuned by the application to gain higher performance or for other special purposes. The getOpt and setOpt methods of UDT are just like the getsockopt and setsockopt functions of socket.

Data and files can be transfered in either direction after a successful connection.

UDT methods are thread safe.

Any applications with UDT should use the following header and library files.

Header

#include <udt.h>

Library

libudt.so

libudt.a