由买买提看人间百态

topics

全部话题 - 话题: datagrams
1 (共1页)
b***y
发帖数: 2799
1
来自主题: Programming版 - [合集] Unix UDP 一问。
☆─────────────────────────────────────☆
DongCunrui (LIG) 于 (Wed Sep 21 17:23:32 2005) 提到:
We can use setsockopt to set the maximal buffer size of a UDP socket.
What I understand is this size is the max size of the UDP datagrams a UDP
socket could receive or send, this buffer is not used to buffer multiple UDP
datagrams, do I misunderstand this? If I'm right, is there anyway to buffer
multiple UDP datagrams? If so, how?
Thanks a lot.
☆─────────────────────────────────────☆
crystalike (Vad
c*****t
发帖数: 1879
2
ffdt.
Read the sample again. It first converts a string into bytes, then
put these bytes into datagram packet and then send it out.
What you can do to send objects is to first serialize the objects
into bytes, then put the bytes into datagram...
n****1
发帖数: 1136
3
tcp哪怕是网络上也是reliable的, udp在本地上可能比较reliable但没有保证, 而且
有长度限制, unix datagram socket是系统文档里面保证绝对reliable的。
Datagram的好处就是容易接收和处理长度不定的多个json object, 每个object包在一
个packet里面. TCP的话不知道一个object长度多大, 而REST确实有点overkill.
z*******w
发帖数: 79
4
Date: Fri, 17 Nov 2000 16:37:04 +0200
From: Ofir Arkin
To: B*****[email protected]
Subject: Using the TOS Byte's Unused Bit (Fingerprinting
WIN2K,
ULTRIX and more)
Background:
Each IP Datagram has an 8-bit field called the "TOS Byte",
which represents the IP support for prioritization and
Type-of-Service handling.
The "TOS Byte" consists of three fields.
The "Precedence field", which is 3-bit long, is intended to
prioritize the IP Datagram. It has eight l
f*******5
发帖数: 10321
5
来自主题: Beijing版 - CTO
文件共享跟下边的口有关
* Microsoft file sharing SMB: User Datagram Protocol (UDP) ports from
135 through 139 and Transmission Control Protocol (TCP) ports from 135
through 139.
* Direct-hosted SMB traffic without a network basic input/output system
(NetBIOS): port 445 (TCP and UPD).
你也可以看看其他什么口开着
http://technet.microsoft.com/en-us/library/cc959833.aspx
m******e
发帖数: 2
6
来自主题: BuildingWeb版 - 新手安装apache后test失败
XP下安装,DSL,动态IP,rounter相连一个LAN。在bin目录下键入apache命令和其它参数
运行正常。但localhost和127.0.0.1不出现任何东西,是怎么回事?
查logs里的error文件,都是notice只有一个warn:A request to send or receive data
was disallowed because the socket is not connected and (when sending on a
datagram socket using a sendto call) no address was supplied. :
setsockopt(SO_UPDATE_ACCEPT_CONTEXT) failed.
还有,是不是用apache就要disable LAN里的QoS?
十分感谢!
n********e
发帖数: 30
7
According to my old knowledge:
When congestion occurs:
TCP vs TCP is fair.
TCP vs UDP is not fair because UDP doesn't have congestion control. The
degree of unfairness is decided by the process that generates the UDP
datagrams.
There are many reasons for congestion. It doesn't matter the physical
network is wifi or ethernet or PPP.Even if you have super fast wifi,
congestion can still happen.
e*****n
发帖数: 109
8
来自主题: EmergingNetworking版 - 问个home networking 的问题
still not working?? It almost sounds like that your switch is bouncing between
vlans. Since your switch should be unmanaged without any of the vlan
capabilities, it defeated what I just said.
Hub is a logical bus technology. Every host on the network segment will
receive a broadcast which means it has to work in your situation unless it is
a broken hub. ;0) Switch uses memory buffers to queue datagrams which give you
better bandwidth. I have a dlink gigabit switch, I did not have to configure
an
s*******8
发帖数: 12734
9
来自主题: EmergingNetworking版 - L2TP协议
Here is something I want to share:
Protocol stack:
ip
ppp
L2TP
udp
IP
layer2
L2TP encapsulation:
IP header+udp header+L2TP header+PPP header+IP header+IP packet Datagram
a**********k
发帖数: 1953
10
来自主题: EmergingNetworking版 - question on TCP and UDP header
datagram vs. stream
o**n
发帖数: 31
11

pretty easy, your object just need to implements serializable,
and read document about serialize to do this.
v*******0
发帖数: 26
12
多谢。
c*****t
发帖数: 1879
13
什么意思?
packet size 是没个定数的,不过一般最少有 1k 左右。
v*******0
发帖数: 26
14
通常的TCP,UDP报文是通过MTU,MRU来决定最大报文长度的。
这个在说用PF_INET生成的socket,因为是系统内部的,所以跟网络的会不一样。
我本来是想用SOCK_STREAM的话,需要给报文加一个类似TPKT的东西,dgram的话可能会受
到报文长度的限制,所以上来问问看有人知道不.
不过现在我已经有办法了,可以用SOCK_SEQPACKET类型,就都搞定了.
欢迎知道的人继续解答这个最大报文长度的问题,谢谢.
k***r
发帖数: 4260
15
1024 is safe
c********t
发帖数: 27
16
DG is variant, but I believe it is more than 1024 bytes.
k***r
发帖数: 4260
17
the upper limit should be 64K but i think many network devices drop
large UDP packets.
P********e
发帖数: 2610
18
这种HTTP下载是不是一般都是TCP的
k***r
发帖数: 4260
19
yes http uses tcp
d******a
发帖数: 238
20

MTU不是决定最大报文长度的,而是决定分片的。
udp包是封装在ip包里的,ipv4的数据包头部有一个2字节的length选项,是ipv4数据包
的最大长度65535,从而决定了udp用户数据最大长度是65535-8-20=65507.
而udp传输又是不可靠的,所以分片很不好,因为丢失了一个分片就会影响其它分片的
重组。所以不同网络环境下mtu不同,发送的udp数据包大小不同,可能只有几百字节,
这是为了避免分片,而不是说我们只能发送几百字节的udp包。
p***o
发帖数: 1252
21
来自主题: Programming版 - 研讨一下TCP fragment的问题
That's socket programming 101: STREAM socket vs. DATAGRAM socket .
c*********e
发帖数: 16335
22
学java,还要知道些networking的基础知识,比如,要知道datagram socket和stream
socket的区别,知道tcp和udp的区别。
z*******3
发帖数: 13709
23

u do understand browsers r also using udp to send some req. like dns query
etc. right?
DNS primarily uses User Datagram Protocol (UDP) on port number 53 to serve
requests.[3] DNS queries consist of a single UDP request from the client
followed by a single UDP reply from the server. The Transmission Control
Protocol (TCP) is used when the response data size exceeds 512 bytes, or for
tasks such as zone transfers. Some resolver implementations use TCP for all
queries.
m*******e
发帖数: 310
24

HKLM\System\CCS\Services\Tcpip\Parameters\Interfaces\{Interf
aceGUID}\MTU
(DWORD)
Value Type: REG_DWORD Number
Valid Range: 68 - the MTU of the underlying network
Default: 0xFFFFFFFF
Description: This parameter overrides the default Maximum
Transmission Unit (MTU) for a network interface. The MTU is
the maximum packet size in bytes that the transport will
transmit over the underlying network. The size includes the
transport header. Note that an IP datagram may span multiple
packets. Values larg
1 (共1页)