Bulk Transport API and Protocols over UDT

Compilation instructions

Suppose you have downloaded the UDT library, our API patch, and the two demo programs in one directory.

$ ls
client.c  cudt_patch0.3.gz  server.c  udt.sdk.2.0.tar.gz

Then you can follow the steps below to patch and compile the library.

$ tar -zxf ./udt.sdk.2.0.tar.gz
$ gunzip ./cudt_patch0.3.gz
$ mv ./cudt_patch0.3 udt2
$ cd udt2
$ patch -p0 < cudt_patch0.3
$ cd src
$ make

Issue the following command to set the LD_LIBRARY_PATH environment variable so that any programs compiled with UDT can be linked with the library.


Then you can compile your programs by issuing the command below:

$ gcc -L<udt2/src> -I<udt2/src> -ludt -lpthread -o myprog myprog.c

where <udt2/src> is the path of the udt2/src directory, and myprog.c is the file name of your C program.  For example, the following commands compile the demo programs client.c and server.c.

# cd to the directory where the downloaded files are stored
$ gcc -Ludt2/src -Iudt2/src -ludt -lpthread -o client client.c
$ gcc -Ludt2/src -Iudt2/src -ludt -lpthread -o server server.c

Execute the demo programs in localhost, where the client reads a local file, sends it to the server, then the server stores it in /tmp/received.c_udt.  In this example, we input /etc/hosts as the file to be sent.

$ ./server &
[2] 10451
$ ./client
Specify the file to send: /etc/hosts
New connection:
[2]+  Done                    ./server
$ diff /etc/hosts /tmp/received.c_udt

Back to the project main page.