參數(shù)資料
型號: MCW1001A-I/SS
廠商: Microchip Technology
文件頁數(shù): 17/66頁
文件大?。?/td> 0K
描述: IC INTERFACE SOCKET XLP 28-SSOP
標(biāo)準(zhǔn)包裝: 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().
相關(guān)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
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
MCW1001AT-I/SS 功能描述:IC INTERFACE SOCKET XLP 28-SSOP RoHS:是 類別:集成電路 (IC) >> 接口 - 專用 系列:* 特色產(chǎn)品:NXP - I2C Interface 標(biāo)準(zhǔn)包裝:1 系列:- 應(yīng)用:2 通道 I²C 多路復(fù)用器 接口:I²C,SM 總線 電源電壓:2.3 V ~ 5.5 V 封裝/外殼:16-TSSOP(0.173",4.40mm 寬) 供應(yīng)商設(shè)備封裝:16-TSSOP 包裝:剪切帶 (CT) 安裝類型:表面貼裝 產(chǎn)品目錄頁面: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