參數(shù)資料
型號(hào): MCW1001A-I/SS
廠商: Microchip Technology
文件頁(yè)數(shù): 16/66頁(yè)
文件大小: 0K
描述: IC INTERFACE SOCKET XLP 28-SSOP
標(biāo)準(zhǔn)包裝: 47
系列: *
2011 Microchip Technology Inc.
Preliminary
DS70671A-page 23
MCW1001A
5.0
TRANSMITTING AND
RECEIVING PACKETS
5.1
TCP
TCP is a standard transport layer protocol described in
Request for Comments (RFC) 793. It provides reliable
stream-based connections over unreliable networks,
and forms the foundation for HTTP, SMTP, and many
other protocol standards. Connections made over TCP
guarantee data transfer at the expense of throughput.
Connections are made through a three-way handshake
process, ensuring a one-to-one connection. Remote
nodes advertise how much data they are ready to
receive,
and
all
data
transmitted
must
be
acknowledged. If a remote node fails to acknowledge
the receipt of data, it is automatically retransmitted.
This ensures that network errors such as lost,
corrupted, or out-of-order packets are automatically
corrected. To accomplish this, TCP must operate in a
buffer. Once the transmit buffer is full, no more data can
be sent until the remote node has acknowledged
receipt. Likewise, the remote node cannot transmit
more data until the local device has acknowledged
receipt and that space is available in the buffer. The
following example illustrates how to use TCP packets:
EXAMPLE 5-1:
USING TCP PACKETS
The MCW1001A TCP sockets can be configured as
servers or clients. The procedure for transferring TCP
packet data in each configuration differs slightly.
5.1.1
MCW1001A TCP SERVER
EXAMPLE
:
1.
Create a TCP socket with call to socket(). This
will return an 8-bit socket handle to be used
when later referencing this socket.
2.
Bind the socket to the listen port with call to
bind(). The bind API specifies the 16-bit local
port number that the client will attempt a
connection on.
3.
Prepare the socket to listen for a connection with
call to listen(). The listen process opens the
specified number of listening sockets that
become the children sockets of the bound
parent. They will all listen to the port specified in
the bind process, but they may accept
connections from different clients (different IP
addresses, different remote port numbers). If the
number of sockets specified is not available, the
listen process will return the number of sockets
it was not able to allocate.
4.
Accept incoming connection through a call to
accept(). Accept is non-blocking for the
MCW1001A and accepting a connection from a
client must be done through polling the socket
with the Accept API.
5.
Communicate with the remote host using send()
and recv().
6.
Close the socket with call to close().
5.1.2
MCW1001A TCP CLIENT EXAMPLE
:
1.
Create a TCP socket with call to socket().
2.
Optionally apply a local port number with a call
to bind(). Otherwise, a pseudo-random local port
number will be assigned.
3.
Connect to the server with call to connect(),
passing sockaddr, IP address.
4.
Communicate with the remote host using send()
and recv().
5.
Close the socket with call to close().
相關(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:是 類(lèi)別:集成電路 (IC) >> 接口 - 專(zhuān)用 系列:* 特色產(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) 安裝類(lèi)型:表面貼裝 產(chǎn)品目錄頁(yè)面:825 (CN2011-ZH PDF) 其它名稱(chēng):568-1854-1
MCW1011 制造商:MINMAX 制造商全稱(chēng):Minmax Technology Co., Ltd. 功能描述:2W, Wide Input Range SIP, Single Output DC/DC Converters
MCW1012 制造商:MINMAX 制造商全稱(chēng):Minmax Technology Co., Ltd. 功能描述:2W, Wide Input Range SIP, Single Output DC/DC Converters
MCW1013 制造商:MINMAX 制造商全稱(chēng):Minmax Technology Co., Ltd. 功能描述:2W, Wide Input Range SIP, Single Output DC/DC Converters
MCW1021 制造商:MINMAX 制造商全稱(chēng):Minmax Technology Co., Ltd. 功能描述:2W, Wide Input Range SIP, Single Output DC/DC Converters