亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? inet.ipmessage.html

?? PTypes是一個擴充了多線程和網絡功能的STL庫
?? HTML
字號:
<html><!-- #BeginTemplate "/Templates/tmpl.dwt" --><!-- DW6 --><head><!-- #BeginEditable "doctitle" --> <title>PTypes: networking: ipmessage</title><!-- #EndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" href="styles.css"></head><body bgcolor="#FFFFFF" leftmargin="40" marginwidth="40"><p><a href="../index.html"><img src="title-20.png" width="253" height="39" alt="C++ Portable Types Library (PTypes) Version 2.0" border="0"></a> <hr size="1" noshade><!-- #BeginEditable "body" --> <p class="hpath"><a href="index.html">Top</a>: <a href="inet.html">Networking</a>: ipmessage</p><blockquote> <pre class="lang">#include &lt;pinet.h&gt;class ipmessage {    ipmessage();    ipmessage(ipaddress ip, int port);    ipmessage(string host, int port);    bool   waitfor(int timeout);    void   send(const char* buf, int count);    void   send(string s);<br>    int    receive(char* buf, int count [, ipaddress&amp; src ] );    string receive(int max [, ipaddress&amp; src ] );    ipaddress get/set_ip();    string    get/set_host();    int       get/set_port();    ipaddress get_myip();    int       get_myport();}</pre></blockquote><p>The <span class="lang">ipmessage</span> class implements connectionless, unreliable datagram communication between IP hosts. The underlying protocol (UDP) never guarantees that a message will be delivered to the destination, however, in return, it has the ability to send broadcast messages on a local network. Unlike the stream-oriented protocols which have some traffic overhead because of the control packets (for opening/closing connections and for confirming each delivery), the message-oriented protocols always send a single packet, sometimes fragmented if it exceeds the size of a physical frame.</p><p>In summary, message-oriented communication is useful in the following situations:</p><ul><li>For sending streaming data (as a rule, sound or video) when losing packets is not crucial. An application may measure the bandwidth and the reliability of a connection before starting a streaming session, to estimate the optimal frequency of packets and adjust the quality of multimedia data (e.g. frames per second, resolution, etc).</li><li>For finding hosts of a specific type on a local network using broadcast/multicast messages. You may want your client application to find its services on a network automatically to free the user from entering the addresses manually.</li><li>For sending very short messages or request/reply cycles, possibly with confirmation/retry mechanism. In most cases developing such applications may be costly compared to using stream-oriented protocols instead.</li></ul><p>The maximum message size is limited to 64 KBytes on most systems. Note however, that sending large messages may result in fragmentation and hence a lesser probability that the whole message will be delivered. You may assume that a maximum data size for a UDP message is 1472 bytes, even though such message may still be fragmented when transferred over a non-Ethernet medium. The size of a guaranteed indivisible UDP packet is 512 bytes on all physical media types.</p><p>For larger data chunks you may consider using streaming protocols, since the TCP control traffic overhead is insignificant compared to data in such cases.</p><p>The <span class="lang">ipmessage</span> and <span class="lang">ipmsgserver</span> classes are not compatible with PTypes streaming interfaces due to unreliable and connectionless nature of the underlying protocol. These classes provide a pair of low-level methods <span class="lang">receive()</span> and <span class="lang">send()</span> and require that the client (<span class="lang">ipmessage</span>) first call <span class="lang">send()</span> prior to receiving, and the server (<span class="lang">ipmsgserver</span>) must first receive data prior to sending. In addition, the server object can be polled for pending data (optionally with timed waiting) using <span class="lang">poll()</span>.</p><p>The <span class="lang">ipmessage</span> class is reusable, i.e. you may use one object to send data to multiple destinations by changing the <span class="lang">ip</span> (or <span class="lang">host</span>) and <span class="lang">port</span> properties.</p><p><span class="lang">Ipmessage</span> can generate exceptions of type <span class="lang">(estream*)</span> with a corresponding error code and a message string.</p><p>(See also Example 2 in <a href="inet.examples.html">Examples</a>)</p><p><span class="def">ipmessage::ipmessage()</span> is the default constructor.</p><p><span class="def">ipmessage::ipmessage(ipaddress ip, int port)</span> constructs an <span class="lang">ipmessage</span> object and assigns the peer <span class="lang">ip</span>/<span class="lang">port</span> values. To send a broadcast message to all hosts on a local network, assign a predefined constant <span class="lang">ipbcast</span> to <span class="lang">ip</span>.</p><p><span class="def">ipmessage::ipmessage(string host, int port)</span> constructs an <span class="lang">ipmessage</span> object and assigns the peer host name and port values. Before actually sending data first time, the object resolves the host name to a numeric IP address. <span class="lang">Host</span> can be either a symbolic DNS name or a numeric address in a string form (e.g. &quot;somehost.com&quot; or &quot;192.168.1.1&quot;).</p><p><span class="def">bool ipmessage::waitfor(int milliseconds)</span> waits on a socket until data is available for reading (returns <span class="lang">true</span>) or the time specified has elapsed, in which case it returns <span class="lang">false</span>.</p><p><span class="def">ipmessage::send(const char* buf, int count)</span> sends data to the peer. <span class="lang">Ip</span>/<span class="lang">host</span> and <span class="lang">port</span> properties must be assigned prior to calling <span class="lang">send()</span>. A client must first call <span class="lang">send()</span> before receiving data from the peer.</p><p> <span class="def">ipmessage::send(string s)</span> works like the previous version of <span class="lang">send()</span> except that it sends the string <span class="lang">s</span> (not including the terminating null-symbol).</p><p><span class="def">int ipmessage::receive(char* buf, int count [, ipaddress&amp; src ] )</span> reads data from the socket. <span class="lang">Receive()</span> may hang if no data is available for reading. This function returns the actual number of bytes read. If the packet received exceeds the size of the supplied buffer, an exception is raised with code EMSGSIZE. You may check if there is data available for reading without 'hanging' using <span class="lang">waitfor()</span> described above. The last optional parameter <span class="lang">src</span> receives the IP address of the host that sent this packet: it may be useful if the packet is received in response to a broadcast request.</p><p><span class="def">string ipmessage::receive(int max [, ipaddress&amp; src ] )</span> works like the previous version of <span class="lang">receive()</span> except that it returns data in a dynamic string. The parameter <span class="lang">max</span> specifies the limit which may not be exceeded when reading data from the network, like with the previous version of <span class="lang">receive()</span>.</p><p><span class="def">ipaddress ipmessage::get/set_ip()</span> sets/retrieves the peer address in a numerical form. If the object was constructed using a symbolic name, <span class="lang">get_ip()</span> may perform a DNS lookup (only once). To send a broadcast message to all hosts on a local network, assign a predefined constant <span class="lang">ipbcast</span> to this property.</p><p><span class="def">string ipmessage::get/set_host()</span> sets/retrieves the peer address in a symbolic form. If the object was constructed using a numeric IP address, <span class="lang">get_host()</span> may perform a reverse DNS lookup.</p><p><span class="def">int ipmessage::get/set_port()</span> sets/retrieves the peer port number.</p><p><span class="def">ipaddress ipmessage::get_myip()</span> returns the local address associated with the socket.</p><p><span class="def">int ipmessage::get_myport()</span> returns the local port number associated with the socket.</p><p class="seealso">See also: <a href="inet.ipmsgserver.html">ipmsgserver</a>, <a href="inet.utils.html">Utilities</a>, <a href="inet.examples.html">Examples</a></p><!-- #EndEditable --> <hr size="1"><a href="../index.html" class="ns">PTypes home</a></body><!-- #EndTemplate --></html>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产综合久久久蜜臀图片| 久久女同精品一区二区| 日韩欧美色综合网站| 国产精品色婷婷| 免费看欧美女人艹b| av不卡一区二区三区| 日韩欧美激情一区| 亚洲精品亚洲人成人网| 狠狠色丁香久久婷婷综合_中| 91浏览器打开| 国产精品污网站| 久久精品国产秦先生| 欧美日韩一区国产| 综合色中文字幕| 国产精品 日产精品 欧美精品| 欧美综合亚洲图片综合区| 欧美激情在线看| 国产精品中文字幕日韩精品 | 亚洲线精品一区二区三区| 国产a区久久久| 精品久久一区二区| 日韩电影在线免费看| 91黄色免费看| 亚洲欧洲综合另类| 99国产精品久久久久久久久久久| 国产亚洲综合在线| 国产一区二区三区黄视频 | 久久精品欧美日韩精品| 日本aⅴ免费视频一区二区三区| 在线免费观看日本欧美| 亚洲少妇30p| 97精品国产97久久久久久久久久久久| 国产日产欧美一区二区视频| 欧美亚洲国产一卡| 成人免费一区二区三区视频| 国产成人aaaa| 中文字幕一区二区不卡| 97久久超碰精品国产| 亚洲婷婷在线视频| 91色.com| 偷拍与自拍一区| 欧美一区二区在线播放| 麻豆精品一区二区三区| 久久久久99精品国产片| 成人激情小说乱人伦| 亚洲欧洲日产国产综合网| 91国偷自产一区二区开放时间 | 99re6这里只有精品视频在线观看| 国产区在线观看成人精品| 丁香婷婷深情五月亚洲| 国产精品免费视频观看| 99精品视频中文字幕| 亚洲妇女屁股眼交7| 欧美高清激情brazzers| 另类小说综合欧美亚洲| 2020国产精品自拍| 粉嫩av亚洲一区二区图片| 中文字幕一区二区三区蜜月| 91麻豆成人久久精品二区三区| 亚洲一区二区三区在线播放| 欧美成人官网二区| 99久久综合精品| 亚洲成人综合在线| 欧美电视剧免费全集观看| 国内精品嫩模私拍在线| 国产精品美女久久久久久久| 欧美在线一区二区| 精品一区二区三区在线播放视频 | 国产成人aaa| 亚洲一区二区三区自拍| 精品欧美黑人一区二区三区| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 精品一区二区三区的国产在线播放| 国产亚洲一区二区三区四区| 91亚洲精品一区二区乱码| 日韩精品1区2区3区| 欧美激情一区三区| 欧美电影在线免费观看| 成人免费视频一区二区| 亚洲国产精品久久久久秋霞影院| 久久综合一区二区| 欧美日韩一本到| 国产成人免费视频一区| 91浏览器打开| 狠狠色综合日日| 亚洲高清中文字幕| 中文字幕中文在线不卡住| 日韩一级成人av| 欧美专区日韩专区| 91免费观看国产| 国产成人午夜视频| 久久se精品一区精品二区| 亚洲综合色网站| 国产精品国产自产拍在线| 日韩欧美一区中文| 欧美区一区二区三区| 99久久久无码国产精品| 国产在线视频精品一区| 视频一区二区中文字幕| 一区二区三区四区国产精品| 国产精品乱人伦中文| 精品久久人人做人人爰| 欧美一级日韩不卡播放免费| 在线观看不卡一区| 91黄色激情网站| 91女厕偷拍女厕偷拍高清| 国产成人免费9x9x人网站视频| 天天色综合天天| 午夜精品一区二区三区三上悠亚| 亚洲人成亚洲人成在线观看图片| 国产精品久久看| 国产精品美女视频| 中文字幕一区av| 国产精品毛片a∨一区二区三区| 欧美xxxxxxxx| 日韩一区二区三区免费观看| 欧美日韩国产经典色站一区二区三区| 91婷婷韩国欧美一区二区| 97se亚洲国产综合自在线| 不卡视频在线观看| 99久久国产综合色|国产精品| 成人综合婷婷国产精品久久蜜臀| 国产精品一线二线三线| 国产在线精品一区二区夜色| 久久99国产精品久久99果冻传媒 | 亚洲电影视频在线| 午夜欧美电影在线观看| 蜜臀av一级做a爰片久久| 久久se精品一区二区| 美脚の诱脚舐め脚责91| 狠狠色综合色综合网络| 国产一区美女在线| 成人av在线播放网站| 色综合一区二区| 色94色欧美sute亚洲线路一ni| 欧洲一区在线电影| 精品视频免费看| 日韩精品资源二区在线| 国产日韩欧美亚洲| 一区二区在线观看视频| 日韩av一区二区三区四区| 韩国精品免费视频| 成人三级伦理片| 欧美日韩另类一区| 久久久一区二区三区| 综合久久给合久久狠狠狠97色| 亚洲国产婷婷综合在线精品| 蜜臀av一区二区在线免费观看| 丁香激情综合五月| 欧美日韩成人综合| 国产午夜亚洲精品理论片色戒| 亚洲精品欧美专区| 欧美无砖砖区免费| 久久久精品中文字幕麻豆发布| ●精品国产综合乱码久久久久| 天堂资源在线中文精品| 国产精品一卡二卡在线观看| 日本久久电影网| 精品国产免费视频| 亚洲一区二区三区四区中文字幕| 蜜桃在线一区二区三区| 色婷婷综合久色| 欧美mv日韩mv国产网站app| 亚洲欧美日韩久久精品| 狠狠色丁香久久婷婷综| 91久久精品网| 久久久99久久| 美美哒免费高清在线观看视频一区二区| 不卡大黄网站免费看| 精品粉嫩超白一线天av| 午夜私人影院久久久久| 91美女片黄在线观看| 久久综合久色欧美综合狠狠| 亚洲丶国产丶欧美一区二区三区| 国产伦精品一区二区三区视频青涩| 国产成人精品免费网站| 91精品国产一区二区三区香蕉| 日韩理论在线观看| 成人中文字幕合集| 久久美女高清视频| 久久久91精品国产一区二区精品| 亚洲精品国产精华液| 亚洲黄色片在线观看| 日本sm残虐另类| 91福利视频在线| 综合亚洲深深色噜噜狠狠网站| 国内成+人亚洲+欧美+综合在线 | 丁香亚洲综合激情啪啪综合| 这里只有精品免费| 亚洲免费成人av| 国产91精品入口| 欧美激情一区二区三区| 国产一区二区三区免费观看| 日韩欧美国产成人一区二区| 午夜久久久影院| 制服.丝袜.亚洲.另类.中文| 中文字幕日本不卡| 成人激情小说乱人伦| 国产精品网站在线观看| 成人激情黄色小说|