Академический Документы
Профессиональный Документы
Культура Документы
Introduction
Installation
Programming using UDT
Performance tuning
Conclusion
Introduction
sf.net/projects/udt
Source code, documentations, mailing lists,
bug reports
Tarball release and CVS
Installation
LD_LIBRARY_PATH
Testing using appserver and appclient
./appserver [port]
./appclient <server-addr> <server-port>
Programming using UDT
socket-like API
UDT:: namespace qualifier
UDTSOCKET
UDTERROR
Programming using UDT
int client = socket(AF_INET, SOCK_STREAM, 0);
connect(client, (sockaddr*)&serv_addr, sizeof(serv_addr));
If (-1 == send(client, data, size, 0))
{
//error processing
}
setsockopt/getsockopt
Overlapped IO
int send(
UDTSOCKET,
const char *buf,
int len,
int flags,
int *handle = NULL,
UDT_MEM_ROUTINE routine = NULL
);
bool getoverlappedresult(
UDTSOCKET u,
const int& handle,
int& progress,
const bool& wait
);
Overlapped IO
New Data
User Buffer
Data
int perfmon(
UDTSOCKET u,
TRACEINFO* perf
);
Performance monitoring
TRACEINFO structure
Aggregate information