📄 dos下的网络编程.mht
字号:
<v:stroke joinstyle=3D"miter"/>
<v:path gradientshapeok=3D"t" o:connecttype=3D"rect"/>
</v:shapetype><v:shape id=3D"_x0000_s1066" type=3D"#_x0000_t202" style=3D'=
position:absolute;
left:3014;top:13296;width:5633;height:408'>
<v:textbox style=3D'mso-next-textbox:#_x0000_s1066'>
<![if !mso]>
<table cellpadding=3D0 cellspacing=3D0 width=3D"100%">
<tr>
<td><![endif]>
<div>
<p class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><span
style=3D'font-family:NSimSun'>物理层<span lang=3DEN-=
US><o:p></o:p></span></span></p>
</div>
<![if !mso]></td>
</tr>
</table>
<![endif]></v:textbox>
</v:shape><v:shape id=3D"_x0000_s1067" type=3D"#_x0000_t202" style=3D'posi=
tion:absolute;
left:8805;top:11258;width:1095;height:262' stroked=3D"f">
<v:textbox style=3D'mso-next-textbox:#_x0000_s1067;mso-fit-shape-to-text:=
t'
inset=3D"0,0,0,0">
<![if !mso]>
<table cellpadding=3D0 cellspacing=3D0 width=3D"100%">
<tr>
<td><![endif]>
<div>
<p class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><span
lang=3DEN-US style=3D'color:fuchsia'>Socket</span><span style=3D'font-=
family:
SimSun;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"=
Times New Roman";
color:fuchsia'>接口</span><span lang=3DEN-US style=3D'colo=
r:fuchsia'><o:p></o:p></span></p>
</div>
<![if !mso]></td>
</tr>
</table>
<![endif]></v:textbox>
</v:shape><v:group id=3D"_x0000_s1068" style=3D'position:absolute;left:301=
4;top:10579;
width:6418;height:2581' coordorigin=3D"3014,10579" coordsize=3D"6418,2581=
">
<v:shape id=3D"_x0000_s1069" type=3D"#_x0000_t202" style=3D'position:abso=
lute;
left:3014;top:11122;width:1250;height:408'>
<v:textbox style=3D'mso-next-textbox:#_x0000_s1069'>
<![if !mso]>
<table cellpadding=3D0 cellspacing=3D0 width=3D"100%">
<tr>
<td><![endif]>
<div>
<p class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><span
style=3D'font-family:NSimSun'>应用层<span lang=3DEN=
-US><o:p></o:p></span></span></p>
</div>
<![if !mso]></td>
</tr>
</table>
<![endif]></v:textbox>
</v:shape><v:shape id=3D"_x0000_s1070" type=3D"#_x0000_t202" style=3D'pos=
ition:absolute;
left:3014;top:11666;width:1250;height:407'>
<v:textbox style=3D'mso-next-textbox:#_x0000_s1070'>
<![if !mso]>
<table cellpadding=3D0 cellspacing=3D0 width=3D"100%">
<tr>
<td><![endif]>
<div>
<p class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><span
style=3D'font-family:NSimSun'>传输层<span lang=3DEN=
-US><o:p></o:p></span></span></p>
</div>
<![if !mso]></td>
</tr>
</table>
<![endif]></v:textbox>
</v:shape><v:shape id=3D"_x0000_s1071" type=3D"#_x0000_t202" style=3D'pos=
ition:absolute;
left:3014;top:12209;width:1248;height:407'>
<v:textbox style=3D'mso-next-textbox:#_x0000_s1071'>
<![if !mso]>
<table cellpadding=3D0 cellspacing=3D0 width=3D"100%">
<tr>
<td><![endif]>
<div>
<p class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><span
lang=3DEN-US style=3D'font-family:NSimSun'>Internet</span><span
style=3D'font-family:NSimSun'>层<span lang=3DEN-US><o:p></o:p><=
/span></span></p>
</div>
<![if !mso]></td>
</tr>
</table>
<![endif]></v:textbox>
</v:shape><v:shape id=3D"_x0000_s1072" type=3D"#_x0000_t202" style=3D'pos=
ition:absolute;
left:4420;top:11122;width:4227;height:408'>
<v:textbox style=3D'mso-next-textbox:#_x0000_s1072'>
<![if !mso]>
<table cellpadding=3D0 cellspacing=3D0 width=3D"100%">
<tr>
<td><![endif]>
<div>
<p class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><span
lang=3DEN-US style=3D'font-family:NSimSun'>Telnet|FTP|HTTP|SMTP|POP3|=
DNS|RIP|SNMP<o:p></o:p></span></p>
</div>
<![if !mso]></td>
</tr>
</table>
<![endif]></v:textbox>
</v:shape><v:shape id=3D"_x0000_s1073" type=3D"#_x0000_t202" style=3D'pos=
ition:absolute;
left:4420;top:11666;width:4227;height:407'>
<v:textbox style=3D'mso-next-textbox:#_x0000_s1073'>
<![if !mso]>
<table cellpadding=3D0 cellspacing=3D0 width=3D"100%">
<tr>
<td><![endif]>
<div>
<p class=3DMsoNormal style=3D'text-indent:52.5pt;mso-char-indent-coun=
t:5.0'><span
lang=3DEN-US style=3D'font-family:NSimSun'>TCP<span
style=3D'mso-spacerun:yes'> =
</span>|<span style=3D'mso-spacerun:yes'>
</span>UDP<o:p></o:p></span></p>
</div>
<![if !mso]></td>
</tr>
</table>
<![endif]></v:textbox>
</v:shape><v:shape id=3D"_x0000_s1074" type=3D"#_x0000_t202" style=3D'pos=
ition:absolute;
left:4419;top:12209;width:4228;height:407'>
<v:textbox style=3D'mso-next-textbox:#_x0000_s1074'>
<![if !mso]>
<table cellpadding=3D0 cellspacing=3D0 width=3D"100%">
<tr>
<td><![endif]>
<div>
<p class=3DMsoNormal><span lang=3DEN-US style=3D'font-family:NSimSun'=
>ARP
|<span
style=3D'mso-spacerun:yes'> =
</span>IP<span
style=3D'mso-spacerun:yes'> =
</span>| IGMP | ICMP<o:p></o:p></span></p>
</div>
<![if !mso]></td>
</tr>
</table>
<![endif]></v:textbox>
</v:shape><v:shape id=3D"_x0000_s1075" type=3D"#_x0000_t202" style=3D'pos=
ition:absolute;
left:4418;top:12753;width:4229;height:407'>
<v:textbox style=3D'mso-next-textbox:#_x0000_s1075'>
<![if !mso]>
<table cellpadding=3D0 cellspacing=3D0 width=3D"100%">
<tr>
<td><![endif]>
<div>
<p class=3DMsoNormal><span lang=3DEN-US style=3D'font-family:NSimSun'=
>Ethernet
| Token Ring | Frame Relay | ATM<o:p></o:p></span></p>
</div>
<![if !mso]></td>
</tr>
</table>
<![endif]></v:textbox>
</v:shape><v:shape id=3D"_x0000_s1076" type=3D"#_x0000_t202" style=3D'pos=
ition:absolute;
left:3014;top:12753;width:1247;height:407'>
<v:textbox style=3D'mso-next-textbox:#_x0000_s1076'>
<![if !mso]>
<table cellpadding=3D0 cellspacing=3D0 width=3D"100%">
<tr>
<td><![endif]>
<div>
<p class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><span
style=3D'font-family:NSimSun'>网络访问层=
;<span
lang=3DEN-US><o:p></o:p></span></span></p>
</div>
<![if !mso]></td>
</tr>
</table>
<![endif]></v:textbox>
</v:shape><v:shape id=3D"_x0000_s1077" type=3D"#_x0000_t202" style=3D'pos=
ition:absolute;
left:3015;top:10579;width:1252;height:407' stroked=3D"f">
<v:textbox style=3D'mso-next-textbox:#_x0000_s1077'>
<![if !mso]>
<table cellpadding=3D0 cellspacing=3D0 width=3D"100%">
<tr>
<td><![endif]>
<div>
<p class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><span
lang=3DEN-US style=3D'font-family:NSimSun;color:#3366FF'>TCP/IP</span=
><span
style=3D'font-family:NSimSun;color:#3366FF'>模型<span
lang=3DEN-US><o:p></o:p></span></span></p>
</div>
<![if !mso]></td>
</tr>
</table>
<![endif]></v:textbox>
</v:shape><v:shape id=3D"_x0000_s1078" type=3D"#_x0000_t202" style=3D'pos=
ition:absolute;
left:4422;top:10579;width:4226;height:407' stroked=3D"f">
<v:textbox style=3D'mso-next-textbox:#_x0000_s1078'>
<![if !mso]>
<table cellpadding=3D0 cellspacing=3D0 width=3D"100%">
<tr>
<td><![endif]>
<div>
<p class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><span
style=3D'font-family:NSimSun;color:#3366FF'>各层次&=
#19978;的协议<span
lang=3DEN-US><o:p></o:p></span></span></p>
</div>
<![if !mso]></td>
</tr>
</table>
<![endif]></v:textbox>
</v:shape><v:line id=3D"_x0000_s1079" style=3D'position:absolute' from=3D=
"9118,11530"
to=3D"9119,11802"/>
<v:line id=3D"_x0000_s1080" style=3D'position:absolute' from=3D"9431,1153=
0" to=3D"9432,12345"/>
<v:line id=3D"_x0000_s1081" style=3D'position:absolute;flip:x' from=3D"86=
48,11802"
to=3D"9118,11803">
<v:stroke endarrow=3D"block"/>
</v:line><v:line id=3D"_x0000_s1082" style=3D'position:absolute;flip:x' f=
rom=3D"8648,12345"
to=3D"9431,12346">
<v:stroke endarrow=3D"block"/>
</v:line></v:group><w:wrap type=3D"none"/>
<w:anchorlock/>
</v:group><![endif]--><![if !vml]><img width=3D552 height=3D260
src=3D"file6875.files/image012.gif" v:shapes=3D"_x0000_s1064 _x0000_s1065 _=
x0000_s1066 _x0000_s1067 _x0000_s1068 _x0000_s1069 _x0000_s1070 _x0000_s107=
1 _x0000_s1072 _x0000_s1073 _x0000_s1074 _x0000_s1075 _x0000_s1076 _x0000_s=
1077 _x0000_s1078 _x0000_s1079 _x0000_s1080 _x0000_s1081 _x0000_s1082"><![e=
ndif]></span><!--[if mso & !supportInlineShapes & supportFields]><span
lang=3DEN-US style=3D'font-size:12.0pt;line-height:125%;font-family:NSimSun=
'><v:shape
id=3D"_x0000_i1025" type=3D"#_x0000_t75" style=3D'width:414pt;height:195pt=
'>
<v:imagedata croptop=3D"-65520f" cropbottom=3D"65520f"/>
</v:shape><span style=3D'mso-element:field-end'></span></span><![endif]--><=
span
lang=3DEN-US style=3D'font-size:12.0pt;line-height:125%;font-family:NSimSun=
'><o:p></o:p></span></p>
<p class=3DMsoNormal style=3D'line-height:125%'><span lang=3DEN-US style=3D=
'font-size:
12.0pt;line-height:125%;font-family:NSimSun'><o:p> </o:p></span></p>
<h3 style=3D'line-height:125%'><span lang=3DEN-US style=3D'font-family:NSim=
Sun'>2 IP</span><span
style=3D'font-family:NSimSun'>地址和端口<span
lang=3DEN-US><o:p></o:p></span></span></h3>
<p class=3DMsoNormal style=3D'line-height:125%'><span style=3D'font-size:12=
.0pt;
line-height:125%;font-family:NSimSun'>在使用<span lang=3D=
EN-US>TCP</span>和<span
lang=3DEN-US>UDP</span>协议通信时,=
517;须同时指定<span
lang=3DEN-US>IP</span>地址和端口号û=
65;能完整地标识一个通=
信地址,在编程中通=
4120;将这两个参数一起ऩ=
0;义在一个<span
lang=3DEN-US>sockaddr_in</span>结构中来使=
992;。<span
lang=3DEN-US><o:p></o:p></span></span></p>
<p class=3DMsoNormal style=3D'line-height:125%'><span lang=3DEN-US style=3D=
'font-size:
12.0pt;line-height:125%;font-family:NSimSun'>struct sockaddr_in <o:p></o:p>=
</span></p>
<p class=3DMsoNormal style=3D'line-height:125%'><span lang=3DEN-US style=3D=
'font-size:
12.0pt;line-height:125%;font-family:NSimSun'>{<o:p></o:p></span></p>
<p class=3DMsoNormal style=3D'line-height:125%'><span lang=3DEN-US style=3D=
'font-size:
12.0pt;line-height:125%;font-family:NSimSun'><span
style=3D'mso-spacerun:yes'> </span><span
style=3D'mso-spacerun:yes'> </span>short <span
style=3D'mso-spacerun:yes'> =
</span>sin_family;<span
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -