NMUDP作为服务器是否需要多线程?(50分)

  • 主题发起人 主题发起人 Dale46
  • 开始时间 开始时间
D

Dale46

Unregistered / Unconfirmed
GUEST, unregistred user!
NMUDP作为服务器的一个端口, 同时接收多个用户发来的信息,
请问是否会因为同时接收而出现漏掉某些信息的情况?
如果是,如何解决??(能详细一点最好)
 
UDP provides a few functions beyond that of IP:
Port Numbers. UDP provides 16-bit port numbers to let multiple processes use
UDP services on the same host. A UDP address is the combination of a 32-bit IP
address and the 16-bit port number.
Checksumming. Unlike IP, UDP does checksum its data, ensuring data integrity.
A packet failing checksum is simply discarded, with no further action taken.

Implementing UDP Flooding
UDP flooding uses the spanning tree algorithm to forward packets in a
controlled manner. Bridging is enabled on each router interface for the sole
purpose of building the spanning tree. The spanning tree prevents loops by
stopping a broadcast from being forwarded out an interface on which the
broadcast was received. The spanning tree also prevents packet duplication
by placing certain interfaces in the blocked state (so that no packets are
forwarded) and other interfaces in the forwarding state (so that packets that
need to be forwarded are forwarded).

To enable UDP flooding, the router must be running software that supports
transparent bridging and bridging must be configured on each interface that
is to participate in the flooding. If bridging is not configured for an
interface, the interface will receive broadcasts, but the router will not
forward those broadcasts and will not use that interface as a destination for
sending broadcasts received on a different interface.

http://www.aciri.org/floyd/tcp_mux.html
http://www.con.wesleyan.edu/~triemer/network/regports.html
...
 
当然有可能漏掉,其实不能算漏掉,应该算没有接到
解决方法其实也很简单:多发几遍,然后自己做验证
 
多人接受答案了。
 
后退
顶部