参数资料
型号: MCW1001A-I/SS
厂商: Microchip Technology
文件页数: 17/66页
文件大小: 0K
描述: IC INTERFACE SOCKET XLP 28-SSOP
标准包装: 47
系列: *
MCW1001A
DS70671A-page 24
Preliminary
2011 Microchip Technology Inc.
5.2
UDP
UDP is a standard transport layer protocol described in
Request for Comments (RFC) 768. It provides fast but
unreliable data-gram based transfers over networks,
and forms the foundation SNTP, SNMP, DNS, and
many other protocol standards. Connections over UDP
should be thought of as data-gram based transfers.
Each packet is a separate entity, the application should
expect some packets to arrive out-of-order or even fail
to reach the destination node. This is in contrast to
TCP, in which the connection is thought of as a stream
and network errors are automatically corrected. These
tradeoffs in reliability are made for an increase in
throughput. In general, UDP transfers operate two to
three times faster than those made over TCP. As UDP
is packet-oriented, each packet must be dealt with in its
entirety by your application before returning to the main
stack loop. When a packet is received, your application
will be called to handle it. This packet will no longer be
available the next time your application is called.
Therefor, you must either perform all necessary
processing or copy the data elsewhere before
returning. When transmitting a packet, your application
must build and transmit the complete packet in one
cycle. The following example illustrates how to use the
TCP packets.
EXAMPLE 5-2:
USING UDP PACKETS
The
MCW1001A
UDP
sockets
require
less
configuration than the TCP counterparts. Sending
packets using UDP sockets can be accomplished by
creating the socket and issuing a Sendto() command
specifying the destination address and port number.
Receiving packets on a UDP socket requires an extra
bind step to set the local port number.
5.2.1
MCW1001A UDP SERVER
EXAMPLE
:
1.
Create a UDP socket with a call to socket
specifying the UDP socket type. If successful,
an 8-bit socket handle will be returned.
2.
Bind the socket to a local port number with a call
to bind()
3.
Receive data using this socket with a call to
recvfrom()
4.
Optionally reply to the client with a call to
Sendto() specifying the returned address and
port number returned in the recvfrom() call.
5.2.2
MCW1001A UDP CLIENT
EXAMPLE
:
1.
Create the UDP socket with a call to socket
specifying the UDP socket type. If successful,
an 8 bit socket handle will be returned.
2.
Transmit data to a remote UDP server with a call
to Sendto() specifying the remote IP address
and port number.
3.
Optionally receive data from the server using
this socket with a call to recvfrom().
相关PDF资料
PDF描述
D38999/26WD15PB CONN PLUG 15POS STRAIGHT W/PINS
VI-BTJ-IW-F3 CONVERTER MOD DC/DC 36V 100W
MAX1564ETE+ IC TRIPLE USB SW 1.2A 16-TQFN
D38999/26WB5SC CONN PLUG 5POS STRAIGHT W/SCKT
D38999/26WB5SB CONN PLUG 5POS STRAIGHT W/SCKT
相关代理商/技术参数
参数描述
MCW1001AT-I/SS 功能描述:IC INTERFACE SOCKET XLP 28-SSOP RoHS:是 类别:集成电路 (IC) >> 接口 - 专用 系列:* 特色产品:NXP - I2C Interface 标准包装:1 系列:- 应用:2 通道 I²C 多路复用器 接口:I²C,SM 总线 电源电压:2.3 V ~ 5.5 V 封装/外壳:16-TSSOP(0.173",4.40mm 宽) 供应商设备封装:16-TSSOP 包装:剪切带 (CT) 安装类型:表面贴装 产品目录页面:825 (CN2011-ZH PDF) 其它名称:568-1854-1
MCW1011 制造商:MINMAX 制造商全称:Minmax Technology Co., Ltd. 功能描述:2W, Wide Input Range SIP, Single Output DC/DC Converters
MCW1012 制造商:MINMAX 制造商全称:Minmax Technology Co., Ltd. 功能描述:2W, Wide Input Range SIP, Single Output DC/DC Converters
MCW1013 制造商:MINMAX 制造商全称:Minmax Technology Co., Ltd. 功能描述:2W, Wide Input Range SIP, Single Output DC/DC Converters
MCW1021 制造商:MINMAX 制造商全称:Minmax Technology Co., Ltd. 功能描述:2W, Wide Input Range SIP, Single Output DC/DC Converters