参数资料
型号: MCW1001A-I/SS
厂商: Microchip Technology
文件页数: 16/66页
文件大小: 0K
描述: IC INTERFACE SOCKET XLP 28-SSOP
标准包装: 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().
相关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