close


Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
TCP與UDP都是屬於OSI第四層的通訊協定
TCP是Connect-oriented, reliable的協定
  要傳資料要先建立connection, 且它會負責資料"完整"且"照順序"的傳到, 但較慢
  (因為可能要重送什麼的~)
相對於TCP,UDP是connectionless
  資料可以直接傳送,但相對,它並不會負責資料重傳
  適合用在小量錯誤/遺失也無所謂且速度較重要的資料(像廣播)
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
幹嘛問這個 @@?
[駱駝]http://0rz.net/b9088 說:
因為最近在看網路上別人用bcb寫的傳輸程式, 他用UDP, 因為他說用TCP在距離遠, 且傳輸時間長時, 很容易不預期斷線
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
喔..可能是TCP預設的timeout不長吧
[駱駝]http://0rz.net/b9088 說:
可能吧, 我也不懂, 所以才請教你
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
網路環境不好的話,斷線也是必然的吧
[駱駝]http://0rz.net/b9088 說:
是呀
[駱駝]http://0rz.net/b9088 說:
因為它說, 他用UDP就不會斷了, 而且速度很快
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
udp沒連線當然就不會斷了 一一"..
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
速度...它是比tcp快一點啦~畢竟tcp要做的事比較多一點
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
只是udp封包可能會掉
[駱駝]http://0rz.net/b9088 說:

Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
如果他沒有自己處理封包重組跟重送的東東的話
跑一跑可能會有問題吧
[駱駝]http://0rz.net/b9088 說:
因為他只寫, 螢幕畫面傳送, 所以不知實用性好不好
[駱駝]http://0rz.net/b9088 說:
對了, 封包如何控制大小呀
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
控制大小~?
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
為什麼要控制?
[駱駝]http://0rz.net/b9088 說:
不知也, 因為我視窗期末在demo時
[駱駝]http://0rz.net/b9088 說:
我班上不是有個魔人
[駱駝]http://0rz.net/b9088 說:
他是寫線上多人踩地雷
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:

Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
是喔
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
哈哈~好帥氣喔
[駱駝]http://0rz.net/b9088 說:
你要我可以傳給你
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
好啊~
[駱駝]http://0rz.net/b9088 說:
只是有點怪怪的, 我用區網ok
[駱駝]http://0rz.net/b9088 說:
我和朋友用wan玩就有問題
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
是喔
[駱駝]http://0rz.net/b9088 說:
http://140.138.144.150/~s922260/No_Mine.rar
[駱駝]http://0rz.net/b9088 說:
互相看不到對方
[駱駝]http://0rz.net/b9088 說:
我們來試試吧
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
好啊
[駱駝]http://0rz.net/b9088 說:
好啦, 回到問題
[駱駝]http://0rz.net/b9088 說:
因為他說他控制封包大小
[駱駝]http://0rz.net/b9088 說:
一個封包1byte
[駱駝]http://0rz.net/b9088 說:
再來1byte中分別儲存各個資料
[駱駝]http://0rz.net/b9088 說:
他說因為他有這樣控制, 所以對網路負荷小, 所以不容易當
[駱駝]http://0rz.net/b9088 說:
他就說 msn的踩地雷寫得不好, 很容易當掉
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
呼呼 呵呵
[駱駝]http://0rz.net/b9088 說:
所以我想試試封包怎麼控制
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
這..其實我也不確定耶~@@'
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
沒試過這種東西 
[駱駝]http://0rz.net/b9088 說:
我完全不會
[駱駝]http://0rz.net/b9088 說:
我查K.top
[駱駝]http://0rz.net/b9088 說:
上面有個討論串, 說封包不能控制 = =
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
Orz
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
硬是要做到幾個byte一個封包傳出去~是一定可以做到啦~
[駱駝]http://0rz.net/b9088 說:

Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
只是 怎麼做 & 出來的效果會怎麼樣我就不知了..
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
我個人是覺得意義不大啦
[駱駝]http://0rz.net/b9088 說:

[駱駝]http://0rz.net/b9088 說:
因為programming windows書上也沒寫
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
而且用那麼小量的資料硬來弄成封包
反而會讓封包的Header占了傳輸資料的大部份吧
對網路資源反而是浪費
[駱駝]http://0rz.net/b9088 說:
弄成封包? 那是指網路傳輸也可以不用封包?
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
UDP Header本身就16 還是 12 bytes吧~ 然後資料才1 byte~
等於大概只有6%的資源在傳資料
[駱駝]http://0rz.net/b9088 說:
那TCP呢
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
我的意思是說~ 硬是要小資料成封包出去~
不弄成封包~還是可以傳出去啊~只是....大概沒人會收吧 Orz
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
TCP更糟吧 XD Header好像 30? bytes
[駱駝]http://0rz.net/b9088 說:
那麼大....
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
有點忘了
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
因為TCP要做重送要做順序~
而且還有一堆雜七雜八的功能
[駱駝]http://0rz.net/b9088 說:
你說指, 每傳一次資料, 就會傳一次header
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
對啊
[駱駝]http://0rz.net/b9088 說:
歐~~~那真得很吃
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
資料要傳出去~一定要附上Header~不然router也不知道那資料是要傳給誰的啊
[駱駝]http://0rz.net/b9088 說:
soga
[駱駝]http://0rz.net/b9088 說:
學到了
[駱駝]http://0rz.net/b9088 說:
這些資通會教嗎
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
會啊
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
而且你會實際接觸到這些的
[駱駝]http://0rz.net/b9088 說:
因為以前有上網查過TCP和UDP的不同, 不過都看不懂
[駱駝]http://0rz.net/b9088 說:
自己寫?
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:

[駱駝]http://0rz.net/b9088 說:
有趣歐~~
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
因為他好像每屆中間的小習題會有些改
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
反正最後會寫個ftp就是了..
[駱駝]http://0rz.net/b9088 說:
用什麼寫.....因為用bcb拉一拉就出來了.....
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
用SocketAPI呀~
[駱駝]http://0rz.net/b9088 說:
那應該要寫很長吧
[駱駝]http://0rz.net/b9088 說:
= =
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
也還好
[駱駝]http://0rz.net/b9088 說:
下學期的課程有趣了歐
Csc@Neili..sihTfOllAstI.zoahS.soahS.oahS. 說:
感覺其實差不多~只是Socket包的沒有那麼細緻~ 寫起來加減還是要費點功
[駱駝]http://0rz.net/b9088 說:
恩, 那要自己寫class封裝了歐...
arrow
arrow
    全站熱搜

    pcjustin 發表在 痞客邦 留言(0) 人氣()