Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2358)

Unified Diff: net/third_party/udt/doc/doc/t-data.htm

Issue 6708091: Remove UDT. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/third_party/udt/doc/doc/t-config.htm ('k') | net/third_party/udt/doc/doc/t-error.htm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/third_party/udt/doc/doc/t-data.htm
===================================================================
--- net/third_party/udt/doc/doc/t-data.htm (revision 78992)
+++ net/third_party/udt/doc/doc/t-data.htm (working copy)
@@ -1,59 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Introduction</title>
-<link rel="stylesheet" href="udtdoc.css" type="text/css" />
-</head>
-
-<body>
-<div class="ref_head">&nbsp;UDT Tutorial</div>
-
-<h3><font color="#000080">Transfering Data using UDT</font></h3>
-<p>This section describes using UDT to transfer data in streaming mode. This is exactly the same as using traditional BSD socket.</p>
-
-<p>In streaming mode, neither a send or a recv call can guarantee that all data are sent or received in one call, because there is no boundary information in the data stream. Application
-should use loops for both sending and receiving.</p>
-
-<p><strong>Example: send a data block (buf, size) using UDT.</strong></p>
-<div class="code">
- int ssize = 0;<br>
- int ss;<br>
- while (ssize < size)<br>
- {<br>
- &nbsp;&nbsp;if (UDT::ERROR == (ss = UDT::send(usock, buf + ssize, size - ssize, 0)))<br>
- &nbsp;&nbsp;{<br>
- &nbsp;&nbsp;&nbsp;&nbsp;cout << "send:" << UDT::getlasterror().getErrorMessage() << endl;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;break;<br>
- &nbsp;&nbsp;}<br>
-<br>
- &nbsp;&nbsp;ssize += ss;<br>
- }
-</div>
-
-<p>Similarily, to receive data stream, the following example code can be used.</p>
-<p><strong>Example: receive &quot;size&quot; of data into buffer &quot;buf&quot; </strong></p>
-<div class="code">
- int rsize = 0;<br>
- int rs;<br>
- while (rsize < size)<br>
- {<br>
- &nbsp;&nbsp;if (UDT::ERROR == (rs = UDT::recv(usock, buf + rsize, size - rsize, 0)))<br>
- &nbsp;&nbsp;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;cout << "recv:" << UDT::getlasterror().getErrorMessage() << endl;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;break;<br>
- &nbsp;&nbsp;}<br>
-<br>
- &nbsp;&nbsp;rsize += rs;<br>
- }
-</div>
-
-<h5>Blocking vs. Non-blocking</h5>
-<p>UDT supports both blocking and non-blocking mode. The above example demonstrated the blocking mode. In non-blocking mode, UDT::send and UDT::recv will return immediately if there is
-no buffer available. Usually, non-blocking calls are used together with accept.</p>
-<p>UDT also supports timed blocking IO with UDT_SNDTIMEO and UDT_RCVTIMEO. This is in the middle between complete blocking and complete non-blocking calls. Timed IO will block the
-sending or receiving call for a limited period. This is sometimes useful if the application does not know if and when the peer side will send a message.</p>
-
-<p>&nbsp;</p>
-</body>
-</html>
« no previous file with comments | « net/third_party/udt/doc/doc/t-config.htm ('k') | net/third_party/udt/doc/doc/t-error.htm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698