<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    這是我吹牛的地方

    想怎么吹就怎么吹

    知道什么叫同步和異步嗎?

    In synchronous receiving, while the server is waiting to receive data from a client, if the stream is empty the main thread will block until the request for data is satisfied. Hence, the server cannot do anything else until it receives data from the client. If another client attempts to connect to the server at that time, the server cannot process that request because it is blocked on the first client. This behavior is not acceptable for a real-world application where we need to support multiple clients at the same time.

    In asynchronous communication, while the server is listening or receiving data from a client, it can still process connection requests from other clients as well as receive data from those clients. When a server is receiving asynchronously, a separate thread (at the OS level) listens on the socket and will invoke a callback function (specified when the asynchronous listening was commenced) when a socket event occurs. This callback function in turn will respond and process that socket event. For example, if the remote program writes some data to the socket, a "read data event" (callback function you specify) is invoked; it knows how to read the data from the socket at that point.

    簡而言之,同步是一對一的,異步是一對多的。我翻譯的太牛了,這么多英文就讓我一句話就概括了。

    posted on 2006-09-19 14:42 西門吹牛 閱讀(3070) 評論(7)  編輯  收藏

    評論

    # re: 知道什么叫同步和異步嗎? 2006-11-06 15:34 chicken

    你翻譯的很垃圾阿 看了英文才懂。。。  回復  更多評論   

    # re: 知道什么叫同步和異步嗎? 2006-12-01 14:50 心內求法

    好像不是翻譯的問題,是理解的問題,呵呵  回復  更多評論   

    # re: 知道什么叫同步和異步嗎? 2008-07-18 12:50 dog

    就是一夫多妻和一夫一妻  回復  更多評論   

    # re: 知道什么叫同步和異步嗎? 2009-04-21 14:10 恩 恩! 真是吹牛的好地方

    ...  回復  更多評論   

    # re: 知道什么叫同步和異步嗎?[未登錄] 2009-06-11 17:10 無名

    概括得好,頂!!!!再頂!!!!  回復  更多評論   

    # re: 知道什么叫同步和異步嗎? 2009-07-12 01:21 卡人力窩里反

    英文單詞的原意和中文的翻譯之間,差別很大,甚至是南轅北轍的!  回復  更多評論   

    # re: 知道什么叫同步和異步嗎? 2009-07-30 14:52 北京的太陽

    在同步接收方式下,當服務器等待從客戶端的數據時,如果傳輸流是空的,主線程會進入阻塞狀態,直到(向客戶端的)數據請求被滿足。因此,服務器不能做其他的操作,直到接收到客戶端的數據。如果同時有另外一個客戶端試圖連接服務器,服務器不能夠處理請求,因為主線程被第一個客戶端設置為阻塞。這種(同步)方式對于需要在同一時間支持多客戶端的實際應用(程序)是不能夠被接受的。
    在異步通信方式下,當服務器監聽或者接受一個客戶端的數據時,它能夠同時連接其他的客戶端并且從其他的客戶端接收數據。當服務器異步地接收(數據),一個單獨的現成(操作系統級別)監聽socket并且當發生socket事件時,會調用一個響應函數(指定異步監聽什么時候開始)。響應函數會輪流地響應和處理socket事件。例如:如果遠程程序向一個socket寫一些數據,一個“寫數據事件”(你指定的響應函數)被調用,在那一時刻它(函數)知道如何從socket讀數據。  回復  更多評論   


    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    <2009年6月>
    31123456
    78910111213
    14151617181920
    21222324252627
    2829301234
    567891011

    導航

    統計

    常用鏈接

    留言簿(5)

    隨筆檔案

    文章檔案

    相冊

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 久久亚洲中文字幕精品一区四| 国产国拍精品亚洲AV片| 亚洲经典在线观看| 日韩免费高清播放器| 最近中文字幕大全中文字幕免费 | 中字幕视频在线永久在线观看免费| 2021免费日韩视频网| 亚洲日韩乱码中文无码蜜桃 | 91大神免费观看| 久久久久久久亚洲Av无码| 亚洲aⅴ无码专区在线观看| 啦啦啦手机完整免费高清观看 | 亚洲福利在线播放| 亚洲综合在线观看视频| 日韩免费无码一区二区三区| 国产免费久久精品| 日韩一级片免费观看| 很黄很色很刺激的视频免费| 亚洲日本久久久午夜精品| 拍拍拍无挡免费视频网站| 久久久亚洲精品国产| 国产四虎免费精品视频| 亚洲中文字幕久久无码| 18女人腿打开无遮掩免费| 久久亚洲国产中v天仙www| 99久久免费中文字幕精品| 国产午夜亚洲精品国产| 日韩精品亚洲专区在线观看| 怡红院免费全部视频在线视频| 2022年亚洲午夜一区二区福利| 精品人妻系列无码人妻免费视频| 亚洲AV无码不卡在线播放| 免费无码AV片在线观看软件| 久久精品国产亚洲AV无码娇色| 永久免费毛片在线播放| 黄网站色视频免费看无下截 | 中文字幕无线码免费人妻| 亚洲国产精品尤物yw在线| 免费看少妇高潮成人片| 亚洲一区在线免费观看| 亚洲精品久久久www |