ࡱ> wyv`Ztbjbjss./nnnnnnnL6$*12fffffAAA0000000$\2h4V09nAA0nnff0%%%nfnf0%0%%V-@nnE.fZ 0e'#&- 000*1-x5M%R5E.E.5n50PAQ%pAAA00% AAA*1 f fnnnnnn 5:F8O 8. C;LB8?;5:A8@>20=85 22>40/2K2>40 8 0A8=E@>==K9 22>4/2K2>4  E>45 MB>9 ;5:F88 2K 87CG8B5 A?>;L7>20=85 A8AB5<=>3> 2K7>20 select A?>;L7>20=85 A8AB5<=>3> 2K7>20 poll 5:>B>@K5 0A?5:BK 8A?>;L7>20=8O select/poll 2 <=>3>?>B>G=KE ?@>3@0<<0E !B0=40@B=K5 A@54AB20 0A8=E@>==>3> 22>40/2K2>40 !8AB5<=K9 2K7>2 select A;8 20H0 ?@>3@0<<0 3;02=K< >1@07>< 70=8<05BAO >?5@0F8O<8 22>40/2K2>40, 2K <>65B5 ?>;CG8BL =081>;55 206=K5 87 ?@58<CI5AB2 <=>3>?>B>G=>AB8 2 >4=>?>B>G=>9 ?@>3@0<<5, 8A?>;L7CO A8AB5<=K9 2K7>2 select(3C).  1>;LH8=AB25 Unix-A8AB5< select O2;O5BAO A8AB5<=K< 2K7>2><, 8;8, 2> 2AO:>< A;CG05, >?8AK205BAO 2 A5:F88 A8AB5<=>3> @C:>2>4AB20 2 (A8AB5<=K5 2K7>2K), B.5. AAK;:0 =0 =53> 4>;6=0 1K;0 1K 2K3;O45BL :0: select(2), => 2 Solaris 10 A>>B25BAB2CNI0O AB@0=8F0 A8AB5<=>3> @C:>2>4AB20 @07<5I5=0 2 A5:F88 3C (AB0=40@B=0O 181;8>B5:0 O7K:0 !). #AB@>9AB20 22>40/2K2>40 >1KG=> @01>B0NB 3>@074> <54;5==55 F5=B@0;L=>3> ?@>F5AA>@0, ?>MB><C ?@8 2K?>;=5=88 >?5@0F89 A =8<8 ?@>F5AA>@ >1KG=> >:07K205BAO 2K=C645= 640BL 8E. >MB><C 2> 2A5E ! A8AB5<=K5 2K7>2K A8=E@>==>3> 22>40/2K2>40 ?@54AB02;ONB A>1>9 1;>:8@CNI85AO >?5@0F88. -B> >B=>A8BAO 8 : A5B52K< :><<C=8:0F8O<  2708<>459AB285 G5@57 =B5@=5B A>?@O65=> A 1>;LH8<8 7045@6:0<8 8, :0: ?@028;>, ?@>8AE>48B G5@57 =5 >G5=L H8@>:89 8/8;8 ?5@53@C65==K9 :0=0; A2O78. A;8 20H0 ?@>3@0<<0 @01>B05B A =5A:>;L:8<8 CAB@>9AB20<8 22>40/2K2>40 8/8;8 A5B52K<8 A>548=5=8O<8, 59 =52K3>4=> 1;>:8@>20BLAO =0 >?5@0F88, A2O70==>9 A >4=8< 87 MB8E CAB@>9AB2, 254L 2 B0:>< A>AB>O=88 >=0 <>65B ?@>?CAB8BL 2>7<>6=>ABL A>25@H8BL 22>4/2K2>4 A 4@C3>3> CAB@>9AB20 157 1;>:8@>2:8. -BC ?@>1;5<C <>6=> @5H0BL ?@8 ?><>I8 A>740=8O =8B59, @01>B0NI8E A @07;8G=K<8 CAB@>9AB20<8.  ?@54K4CI8E ;5:F8OE <K 87CG8;8 2A5 =5>1E>48<>5 4;O @07@01>B:8 B0:8E ?@>3@0<<. 4=0:> 4;O @5H5=8O MB>9 ?@>1;5<K 5ABL 8 4@C385 A@54AB20. !8AB5<=K9 2K7>2 select(3C) ?>72>;O5B >6840BL 3>B>2=>AB8 =5A:>;L:8E CAB@>9AB2 8;8 A5B52KE A>548=5=89 (2 459AB28B5;L=>AB8, 3>B>2=>AB8 >1J5:B>2 1>;LH8=AB20 B8?>2, :>B>@K5 <>3CB 1KBL 845=B8D8F8@>20=K D09;>2K< 45A:@8?B>@><). >340 >48= 8;8 =5A:>;L:> 87 45A:@8?B>@>2 >:07K20NBAO 3>B>2K ?5@540BL 40==K5, select(3C) 2>72@0I05B C?@02;5=85 ?@>3@0<<5 8 ?5@5405B A?8A:8 3>B>2KE 45A:@8?B>@>2 2 2KE>4=KE ?0@0<5B@0E.  :0G5AB25 ?0@0<5B@>2 select(3C) 8A?>;L7C5B <=>65AB20 (=01>@K) 45A:@8?B>@>2.  AB0@KE Unix-A8AB5<0E <=>65AB20 1K;8 @50;87>20=K 2 2845 1024-@07@O4=KE 18B>2KE <0A>:.  A>2@5<5==KE Unix-A8AB5<0E 8 2 4@C38E !, @50;87CNI8E select, <=>65AB20 @50;87>20=K 2 2845 =5?@>7@0G=>3> B8?0 fd_set, =04 :>B>@K< >?@545;5=K =5:>B>@K5 B5>@5B8:>-<=>65AB25==K5 >?5@0F88, 0 8<5==>  >G8AB:0 <=>65AB20, 2:;NG5=85 45A:@8?B>@0 2 <=>65AB2>, 8A:;NG5=85 45A:@8?B>@0 87 <=>65AB20 8 ?@>25@:0 =0;8G8O 45A:@8?B>@0 2 <=>65AB25. @5?@>F5AA>@=K5 48@5:B82K 4;O 2K?>;=5=8O MB8E >?5@0F89 >?8A0=K =0 AB@0=8F5 @C:>2>4AB20 select(3C).  32-@07@O4=KE 25@A8OE Unix SVR4, 2 B>< G8A;5 2 Solaris, fd_set ?> ?@56=5<C ?@54AB02;O5B A>1>9 1024-18B>2CN <0A:C; 2 64-@07@O4=KE 25@A8OE SVR4 MB> <0A:0 @07@O4=>AB8 65536 18B. 07<5@ <0A:8 >?@545;O5B =5 B>;L:> <0:A8<0;L=>5 :>;8G5AB2> D09;>2KE 45A:@8?B>@>2 2 =01>@5, => 8 <0:A8<0;L=K9 =><5@ D09;>2>3> 45A:@8?B>@0 2 =01>@5. 07<5@ <0A:8 2 20H59 25@A88 A8AB5<K <>6=> >?@545;8BL 2> 2@5<O :><?8;OF88 ?> 7=0G5=8N ?@5?@>F5AA>@=>3> A8<2>;0 FD_SETSIZE. C<5@0F8O D09;>2KE 45A:@8?B>@>2 2 Unix =0G8=05BAO A 0, ?>MB><C <0:A8<0;L=K9 =><5@ 45A:@8?B>@0 @025= FD_SETSIZE-1. "0:8< >1@07><, 5A;8 2K 8A?>;L7C5B5 select(3C), 20< =5>1E>48<> CAB0=>28BL >3@0=8G5=8O =0 :>;8G5AB2> 45A:@8?B>@>2 20H53> ?@>F5AA0. -B> <>65B 1KBL A45;0=> H5;;>2A:>9 :><0=4>9 ulimit(1) ?5@54 70?CA:>< ?@>F5AA0 8;8 A8AB5<=K< 2K7>2>< setrlimit(2) C65 2> 2@5<O 8A?>;=5=8O 20H53> ?@>F5AA0. 07C<55BAO, setrlimit(2) =5>1E>48<> 2K720BL 4> B>3>, :0: 2K =0G=5B5 A>74020BL D09;>2K5 45A:@8?B>@K. A;8 20< =5>1E>48<> 8A?>;L7>20BL 1>;55 1024 45A:@8?B>@>2 2 32-18B=>9 ?@>3@0<<5, Solaris 10 ?@54>AB02;O5B ?5@5E>4=K9 API. ;O 53> 8A?>;L7>20=8O =5>1E>48<> >?@545;8BL ?@5?@>F5AA>@=K9 A8<2>; FD_SETSIZE A G8A;>2K< 7=0G5=85<, ?@52KH0NI8< 1024, ?5@54 2:;NG5=85< D09;0 <sys/time.h>. @8 MB>< 2 D09;5 <sys/select.h> A@01>B0NB =5>1E>48<K5 ?@5?@>F5AA>@=K5 48@5:B82K 8 B8? fd_set 1C45B >?@545;5= :0: 1>;LH0O 18B>20O <0A:0, 0 select 8 4@C385 A8AB5<=K5 2K7>2K MB>3> A5<59AB20 1C4CB ?5@5>?@545;5=K 4;O 8A?>;L7>20=8O <0A>: B0:>3> @07<5@0.  =5:>B>@KE @50;870F8OE fd_set @50;87>20= 4@C38<8 A@54AB20<8, 157 8A?>;L7>20=8O 18B>2KE <0A>:. 0?@8<5@, Win32 ?@54>AB02;O5B select 2 A>AB025 B0: =07K205<>3> Winsock API.  Win32 fd_set @50;87>20= :0: 48=0<8G5A:89 <0AA82, A>45@60I89 7=0G5=8O D09;>2KE 45A:@8?B>@>2. >MB><C 20< =5 A;54C5B ?>;030BLAO =0 7=0=85 2=CB@5==59 AB@C:BC@K B8?0 fd_set. "0: 8;8 8=0G5, 87<5=5=8O @07<5@0 18B>2>9 <0A:8 fd_set 8;8 2=CB@5==53> ?@54AB02;5=8O MB>3> B8?0 B@51CNB ?5@5:><?8;OF88 2A5E ?@>3@0<<, 8A?>;L7CNI8E select(3C).  1C4CI5<, :>340 0@E8B5:BC@=K9 ;8<8B 2 65536 45A:@8?B>@>2 =0 ?@>F5AA 1C45B ?>2KH5=, <>65B ?>B@51>20BLAO =>20O 25@A8O @50;870F88 fd_set 8 select 8 =>20O ?5@5:><?8;OF8O ?@>3@0<<. 'B>1K 871560BL MB>3> 8 C?@>AB8BL ?5@5E>4 =0 =>2CN 25@A8N ABI, :><?0=8O Sun Microsystems @5:><5=4C5B >B:07K20BLAO >B 8A?>;L7>20=8O select(3C) 8 8A?>;L7>20BL 2<5AB> =53> A8AB5<=K9 2K7>2 poll(2). !8AB5<=K9 2K7>2 poll(2) @0AA<0B@8205BAO 40;55 =0 MB>9 ;5:F88. !8AB5<=K9 2K7>2 select(3C) 8<55B ?OBL ?0@0<5B@>2. int nfds  G8A;>, =0 548=8FC 1>;LH55, G5< <0:A8<0;L=K9 =><5@ D09;>2>3> 45A:@8?B>@0 2> 2A5E <=>65AB20E, ?5@540==KE :0: ?0@0<5B@K. fd_set *readfds  E>4=>9 ?0@0<5B@, <=>65AB2> 45A:@8?B>@>2, :>B>@K5 A;54C5B ?@>25@OBL =0 3>B>2=>ABL : GB5=8N. >=5F D09;0 8;8 70:@KB85 A>:5B0 AG8B05BAO G0AB=K< A;CG05< 3>B>2=>AB8 : GB5=8N. 53C;O@=K5 D09;K 2A5340 AG8B0NBAO 3>B>2K<8 : GB5=8N. "0:65, 5A;8 2K E>B8B5 ?@>25@8BL A;CH0NI89 A>:5B TCP =0 3>B>2=>ABL : 2K?>;=5=8N accept(3SOCKET), 53> A;54C5B 2:;NG8BL 2 MB> <=>65AB2>. "0:65, 2KE>4=>9 ?0@0<5B@, <=>65AB2> 45A:@8?B>@>2, 3>B>2KE : GB5=8N. fd_set *writefds  E>4=>9 ?0@0<5B@, <=>65AB2> 45A:@8?B>@>2, :>B>@K5 A;54C5B ?@>25@OBL =0 3>B>2=>ABL : 70?8A8. H81:0 ?@8 >B;>65==>9 70?8A8 AG8B05BAO G0AB=K< A;CG05< 3>B>2=>AB8 : 70?8A8. 53C;O@=K5 D09;K 2A5340 3>B>2K : 70?8A8. HJVX|~   T \ : < j x    * 2 4 B N P   6 XZ\`bd>(*nz~ j|~h^ LhvmH sH hv hvhvhbLmH sH  haqhbL hbLhbL haqhaqhaqhbLM ^ J x >Nt "%&)T,0Z1\25GKM^gd]zgdbL & FgdbLgdbLgdbLZtDFrt"*,.:>XZ $*NVX^` 4:> !!!!!!!ϼϴh]zmH sH h]zh$~ h=(haqh=(mH sH h=( h=(h=(haqmH sH  haqhaqhaqh^ Lhv hvhvhvmH sH C!!f"j"l"z""""""""###L$^$f$$$$%%"&0&8&j&p&v&&&&''''''''''''''''''''\(`(b(h(j(((()))))))t*z************hbLhaq h=(h=(h=(mH sH h=( h]zh=(h]zmH sH h]z h]zh]zP*+ +++++D,H,J,P,T,,,,,,x-----........h/n/r///////0 0 00f0n00001"1&1(1,1Z1`1b1j1p11\2`2b2h2l2z2|2~228333F44hwhgt hgthgt hgth]zh`-h h]zh]zh]zmH sH h]zh=( h=(h=(h=(mH sH H44444455555555566P7R7T77FFFFFFFGGGGGGG.I4I6IIPJK"K$K2K8KFKLKTKVKKK LLLL(L,L.L2LvLzLLLLLLN N NNNNNNNNN h,rh,rh,rmH sH  h`-hh`-hh`-hmH sH Uhwh`-hh]zhgt hgthgthgtmH sH L"0:65, 5A;8 2K E>B8B5 ?@>25@8BL 7025@H5=85 >?5@0F88 0A8=E@>==>3> connect(3SOCKET), A>:5B A;54C5B 2:;NG8BL 2 MB> <=>65AB2>. "0:65, 2KE>4=>9 ?0@0<5B@, <=>65AB2> 45A:@8?B>@>2, 3>B>2KE : 70?8A8. fd_set *errorfds  E>4=>9 ?0@0<5B@, <=>65AB2> 45A:@8?B>@>2, :>B>@K5 A;54C5B ?@>25@OBL =0 =0;8G85 8A:;NG8B5;L=KE A>AB>O=89. ?@545;5=85 8A:;NG8B5;L=>3> A>AB>O=8O 7028A8B >B B8?0 D09;>2>3> 45A:@8?B>@0. ;O A>:5B>2 TCP 8A:;NG8B5;L=>5 A>AB>O=85 2>7=8:05B ?@8 ?@8E>45 2=5?>;>A=KE 40==KE. 53C;O@=K5 D09;K 2A5340 AG8B0NBAO =0E>4OI8<8AO 2 8A:;NG8B5;L=>< A>AB>O=88. "0:65, 2KE>4=>9 ?0@0<5B@, <=>65AB2> 45A:@8?B>@>2, =0 :>B>@KE 2>7=8:;8 8A:;NG8B5;L=K5 A>AB>O=8O. struct timeval * timeout  B09<-0CB, 2@5<5==>9 8=B5@20;, 7040205<K9 A B>G=>ABLN 4> <8:@>A5:C=4. A;8 MB>B ?0@0<5B@ @025= NULL, B> select(3C) 1C45B >6840BL =5>3@0=8G5==>5 2@5<O; 5A;8 2 AB@C:BC@5 7040= =C;52>9 8=B5@20; 2@5<5=8, select(3C) @01>B05B 2 @568<5 >?@>A0, B> 5ABL 2>72@0I05B C?@02;5=85 =5<54;5==>, 2>7<>6=> A ?CABK<8 =01>@0<8 45A:@8?B>@>2. <5AB> 2A5E ?0@0<5B@>2 B8?0 fd_set * <>6=> ?5@540BL =C;52>9 C:070B5;L. -B> >7=0G05B, GB> A>>B25BAB2CNI89 :;0AA A>1KB89 =0A =5 8=B5@5AC5B. select(3C) 2>72@0I05B >1I55 :>;8G5AB2> 3>B>2KE 45A:@8?B>@>2 2> 2A5E <=>65AB20E ?@8 =>@<0;L=>< 7025@H5=88 (2 B>< G8A;5 ?@8 7025@H5=88 ?> B09<-0CBC), 8 -1 ?@8 >H81:5.  ?@8<5@5 1 ?@82>48BAO 8A?>;L7>20=85 select(3C) 4;O :>?8@>20=8O 40==KE 87 A5B52>3> A>548=5=8O =0 B5@<8=0;, 0 A B5@<8=0;0  2 A5B52>5 A>548=5=85. -B0 ?@>3@0<<0 C?@>I5==0O, >=0 ?@54?>;0305B, GB> 70?8AL =0 B5@<8=0; 8 2 A5B52>5 A>548=5=85 =8:>340 =5 1C45B 701;>:8@>20=0. >A:>;L:C 8 B5@<8=0;, 8 A5B52>5 A>548=5=85 8<5NB 2=CB@5==85 1CD5@K, ?@8 =51>;LH8E ?>B>:0E 40==KE MB> >1KG=> B0: 8 5ABL. @8<5@ 1. 2CAB>@>==55 :>?8@>20=85 40==KE <564C B5@<8=0;>< 8 A5B52K< A>548=5=85<. @8<5@ 27OB 87 :=838 #. . !B825=A, Unix: @07@01>B:0 A5B52KE ?@8;>65=89. <5AB> AB0=40@B=KE A8AB5<=KE 2K7>2>2 8A?>;L7CNBAO >15@B:8, >?8A0==K5 2 D09;5  unp.h #include "unp.h" void str_cli(FILE *fp, int sockfd) { int maxfdp1, stdineof; fd_set rset; char sendline[MAXLINE], recvline[MAXLINE]; stdineof = 0; FD_ZERO(&rset); for ( ; ; ) { if (stdineof == 0) FD_SET(fileno(fp), &rset); FD_SET(sockfd, &rset); maxfdp1 = max(fileno(fp), sockfd) + 1; Select(maxfdp1, &rset, NULL, NULL, NULL); if (FD_ISSET(sockfd, &rset)) { /* socket is readable */ if (Readline(sockfd, recvline, MAXLINE) == 0) { if (stdineof == 1) return; /* normal termination */ else err_quit("str_cli: server terminated prematurely"); } Fputs(recvline, stdout); } if (FD_ISSET(fileno(fp), &rset)) { /* input is readable */ if (Fgets(sendline, MAXLINE, fp) == NULL) { stdineof = 1; Shutdown(sockfd, SHUT_WR); /* send FIN */ FD_CLR(fileno(fp), &rset); continue; } Writen(sockfd, sendline, strlen(sendline)); } } } 1@0B8B5 2=8<0=85, GB> ?@>3@0<<0 ?@8<5@0 1 70=>2> ?5@5A>7405B <=>65AB20 45A:@8?B>@>2 ?5@54 :064K< 2K7>2>< select(3C). -B> =5>1E>48<>, ?>B><C GB> ?@8 =>@<0;L=>< 7025@H5=88 select(3C) <>48D8F8@C5B A2>8 ?0@0<5B@K. select(3C) AG8B05BAO MT-Safe, >4=0:> ?@8 53> 8A?>;L7>20=88 2 <=>3>?>B>G=>9 ?@>3@0<<5 =04> 8<5BL 2 284C A;54CNI89 <><5=B. 59AB28B5;L=>, A0< ?> A515 select(3C) =5 8A?>;L7C5B ;>:0;L=KE 40==KE 8 ?>MB><C 53> 2K7>2 87 =5A:>;L:8E =8B59 =5 4>;65= ?@82>48BL : ?@>1;5<0<. 4=0:> 5A;8 =5A:>;L:> =8B59 @01>B0NB A ?5@5A5:0NI8<8AO =01>@0<8 D09;>2KE 45A:@8?B>@>2, 2>7<>65= B0:>9 AF5=0@89: 8BL 1 2:;NG05B 45A:@8?B>@ s 2 =01>@ readfds 8 2K7K205B select. select 2 =8B8 1 2>72@0I05B s :0: 3>B>2K9 4;O GB5=8O 8BL 2 2:;NG05B 45A:@8?B>@ s 2 =01>@ readfds 8 2K7K205B select select 2 =8B8 2 2>72@0I05B s :0: 3>B>2K9 4;O GB5=8O 8BL 1 2K7K205B read 87 45A:@8?B>@0 s 8 ?>;CG05B 2A5 40==K5 87 53> 1CD5@0 8BL 2 2K7K205B read 87 45A:@8?B>@0 s 8 1;>:8@C5BAO. 'B>1K 871560BL MB>3> AF5=0@8O, @01>BC A D09;>2K<8 45A:@8?B>@0<8 2 B0:8E CA;>28OE A;54C5B 70I8I0BL <CB5:A0<8 8;8 :0:8<8-B> 4@C38<8 ?@8<8B820<8 2708<>8A:;NG5=8O. 06=> ?>4G5@:=CBL, GB> 70I8I0BL =04> =5 select, 0 8<5==> ?>A;54>20B5;L=>ABL >?5@0F89 =04 :>=:@5B=K< D09;>2K< 45A:@8?B>@><, =0G8=0O A 2:;NG5=8O 45A:@8?B>@0 2 <=>65AB2> 4;O select 8 70:0=G820O ?@85<>< 40==KE 87 MB>3> 45A:@8?B>@0, B>G=55, >1=>2;5=85< C:070B5;59 2 1CD5@5, 2 :>B>@K9 2K AG8B0;8 MB8 40==K5. A;8 MB>3> =5 A45;0BL, 2>7<>6=K 5I5 1>;55 C2;5:0B5;L=K5 AF5=0@88, =0?@8<5@: 8BL 1 2:;NG05B 45A:@8?B>@ s 2 =01>@ readfds 8 2K7K205B select. select 2 =8B8 1 2>72@0I05B s :0: 3>B>2K9 4;O GB5=8O 8BL 2 2:;NG05B 45A:@8?B>@ s 2 =01>@ readfds 8 2K7K205B select select 2 =8B8 2 2>72@0I05B s :0: 3>B>2K9 4;O GB5=8O 8BL 1 2K7K205B read 87 45A:@8?B>@0 s 8 ?>;CG05B B>;L:> G0ABL 40==KE 87 53> 1CD5@0 8BL 2 2K7K205B read 87 45A:@8?B>@0 s, ?>;CG05B 40==K5 8 70?8AK205B 8E ?>25@E 40==KE, ?>;CG5==KE =8BLN 1  ;5:F88 10 <K @0AA<>B@8< 0@E8B5:BC@C ?@8;>65=8O, 2 :>B>@>< =5A:>;L:> =8B59 @01>B0NB A >1I8< ?C;>< D09;>2KE 45A:@8?B>@>2  B0: =07K205<CN 0@E8B5:BC@C @01>G8E =8B59 (worker threads). @8 MB>< =8B8, @07C<55BAO, 4>;6=K C:07K20BL 4@C3 4@C3C, A :0:8<8 8<5==> 45A:@8?B>@0<8 >=8 A59G0A @01>B0NB. C;LB8?;5:A8@>20=85 22>40 ?@8 ?><>I8 poll(2) !8AB5<=K9 2K7>2 poll(2) 2K?>;=O5B ?@81;878B5;L=> B5 65 7040G8, GB> 8 select(3C), => 8A?>;L7C5B =5A:>;L:> 1>;55 C4>1=K9 A?>A>1 ?5@540G8 8=D>@<0F88 > B><, :0:85 45A:@8?B>@K 53> 8=B5@5ACNB. poll(2) 8<55B B@8 ?0@0<5B@0: struct pollfd fds[]  <0AA82 >?8A0B5;59 45A:@8?B>@>2. !B@C:BC@0 pollfd >1AC6405BAO 40;55 2 MB>< @0745;5 nfds_t nfds  :>;8G5AB2> >?8A0B5;59 2 <0AA825 fds int timeout  B09<-0CB 2 <8;;8A5:C=40E. A;8 ?0@0<5B@ timeout @025= 0, poll @01>B05B 2 @568<5 >?@>A0 (2>72@0I05B C?@02;5=85 =5<54;5==>). A;8 >= @025= -1, poll 645B 3>B>2=>AB8 45A:@8?B>@>2 =5>3@0=8G5==>5 2@5<O. !B@C:BC@0 pollfd 8<55B A;54CNI85 ?>;O: int fd  45A:@8?B>@ D09;0. A;8 MB> ?>;5 8<55B >B@8F0B5;L=>5 7=0G5=85, 70?8AL 83=>@8@C5BAO. short events  A>1KB8O, A2O70==K5 A fd, :>B>@K5 =0A 8=B5@5ACNB. short revents  return events, A>1KB8O, A2O70==K5 A fd, :>B>@K5 @50;L=> ?@>87>H;8. NN.P0PzPPPPPP8S:S(T0T4TUUUUU"U\\\\\\]n]z]~]]]]]]]]]]]]]]^^^^^^``````a a a,a0aa񬤝 hoYhoYhoYmH sH hoY h,rh,rCJOJQJ^JaJ(h,rh,rCJOJQJ^JaJmH sH h,rmH sH hgt h,rh`-hh`-hmH sH h`-hh,r h,rh,r>M0P:S"UDUFUUUU:Vm & FgdoY & FgdwgdoY & FgdoYgdgtgd,r>afahajaaaaaaabbb"b$bLbNbPbbbbbbb2c:cmmmmmmmm"n.n2n4n:noo oJoVoXodofolovoooop$p&p(p*p2p4p6p8pxp~pppppppppqqqqq*r>rJrLrvrž hYahYahYamH sH hYa hwhw hwh hwhgt hhoY hhhmH sH h hoYhwhwmH sH hwC>mmJopp*rxr2ssXtZt^gdYagdYa^gdgdgd vrxr~rrrr2ssJsPszs~sssssssssssstttttt"tVtZthYa hYahYahYamH sH hw ,1h. A!"R#n$n% B@B 1KG=K9CJ_HaJmHsHtH^@^ bL 03>;>2>: 1$<@&5CJ KH OJQJ\^JaJ `@` bL 03>;>2>: 2$<@& 56CJOJQJ\]^JaJBA@B A=>2=>9 H@8DB 0170F0Xi@X 1KG=0O B01;8F04 l4a .k@. 5B A?8A:0/Ec%<Qd' A h*{.^pduv  P i +!c!!!!!!"4"F"t""""""""#+%k%%%&\&&((!)`)))P*r++x,,--.l.../00 0 0 0 000%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0% 0% 0% 0% 0% 0% 0%0% 0% 0% 0% 0% 0% 0%00000000000Ec%<Qd' A h*{.^pduv  P i +!c!!!!!!"4"F"t""""""""#+%k%%%&\&&((!)`)))/00 0 0 0 000%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0%0% 0% 0% 0% 0% 0% 0%0% 0% 0% 0% 0 % 0 % 00z!*4N>aivrZt !";>?AMZ>mZt<=@Zt8@0(  B S  ? d& 4 T䦗lG-T D?$$ $% dlӡҫ $& ? ¬?,>X k HMO###N$+/     .@Z m JOQ###P$+/ C*urn:schemas-microsoft-com:office:smarttagsmetricconverter p63C ProductID I K &/ir.0"$Y[IK.06=MR&+bi^del]`ns{  & . < B C E I M Y _ b f y  !!!!!3!;!m!u!w!~!!!!!!!!!!!!! """"%"'"8"@"S"Y"""""""""""""""""P%W%%%&&((F)M)x,~,,,,,,,,,,,------........................./ ` N O P [ *4hcn.[^dvz   " $ U Y u y /!1!g!k!!!!!" "8"@"J"S"{""""""##''x,~,,,--..l.q.../33333333333333333333333333333333333c;N*P*--.+.//5;^Nq{^6\Airl 6^`o(. ^`hH. pLp^p`LhH. @ @ ^@ `hH. ^`hH. L^`LhH. ^`hH. ^`hH. PLP^P`LhH.h ^`hH.h ^`hH.h pLp^p`LhH.h @ @ ^@ `hH.h ^`hH.h L^`LhH.h ^`hH.h ^`hH.h PLP^P`LhH.h^`OJQJo(hHh^`OJQJ^Jo(hHohpp^p`OJQJo(hHh@ @ ^@ `OJQJo(hHh^`OJQJ^Jo(hHoh^`OJQJo(hHh^`OJQJo(hHh^`OJQJ^Jo(hHohPP^P`OJQJo(hHAir5;^q{^#3h"7&"7"7>?@ABDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdeghijklmopqrstuxRoot Entry FezData C1TableK25WordDocument.SummaryInformation(fDocumentSummaryInformation8nCompObjq  F Microsoft Office Word MSWordDocWord.Document.89q