home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / p / python / pytexdoc / ext / lib / lib2 / ctb / tex
LaTeX Document  |  1996-11-08  |  5.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: LaTeX Document (document/latex).

You can browse this item here: tex

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 42 75 69 6c 74 2d 69 |\section|{Built-i|
|00000010| 6e 20 4d 6f 64 75 6c 65 | 20 5c 73 65 63 74 63 6f |n Module| \sectco|
|00000020| 64 65 7b 63 74 62 7d 7d | 0a 5c 62 69 6d 6f 64 69 |de{ctb}}|.\bimodi|
|00000030| 6e 64 65 78 7b 63 74 62 | 7d 0a 5c 72 65 6e 65 77 |ndex{ctb|}.\renew|
|00000040| 63 6f 6d 6d 61 6e 64 7b | 5c 69 6e 64 65 78 73 75 |command{|\indexsu|
|00000050| 62 69 74 65 6d 7d 7b 28 | 69 6e 20 6d 6f 64 75 6c |bitem}{(|in modul|
|00000060| 65 20 63 74 62 29 7d 0a | 0a 54 68 69 73 20 6d 6f |e ctb)}.|.This mo|
|00000070| 64 75 6c 65 20 70 72 6f | 76 69 64 65 73 20 61 20 |dule pro|vides a |
|00000080| 70 61 72 74 69 61 6c 20 | 69 6e 74 65 72 66 61 63 |partial |interfac|
|00000090| 65 20 74 6f 20 74 68 65 | 20 4d 61 63 69 6e 74 6f |e to the| Macinto|
|000000a0| 73 68 0a 43 6f 6d 6d 75 | 6e 69 63 61 74 69 6f 6e |sh.Commu|nication|
|000000b0| 73 20 54 6f 6f 6c 62 6f | 78 2e 20 43 75 72 72 65 |s Toolbo|x. Curre|
|000000c0| 6e 74 6c 79 2c 20 6f 6e | 6c 79 20 43 6f 6e 6e 65 |ntly, on|ly Conne|
|000000d0| 63 74 69 6f 6e 20 4d 61 | 6e 61 67 65 72 20 74 6f |ction Ma|nager to|
|000000e0| 6f 6c 73 20 61 72 65 0a | 73 75 70 70 6f 72 74 65 |ols are.|supporte|
|000000f0| 64 2e 20 20 49 74 20 6d | 61 79 20 6e 6f 74 20 62 |d. It m|ay not b|
|00000100| 65 20 61 76 61 69 6c 61 | 62 6c 65 20 69 6e 20 61 |e availa|ble in a|
|00000110| 6c 6c 20 4d 61 63 20 50 | 79 74 68 6f 6e 20 76 65 |ll Mac P|ython ve|
|00000120| 72 73 69 6f 6e 73 2e 0a | 0a 5c 62 65 67 69 6e 7b |rsions..|.\begin{|
|00000130| 64 61 74 61 64 65 73 63 | 7d 7b 65 72 72 6f 72 7d |datadesc|}{error}|
|00000140| 0a 54 68 65 20 65 78 63 | 65 70 74 69 6f 6e 20 72 |.The exc|eption r|
|00000150| 61 69 73 65 64 20 6f 6e | 20 65 72 72 6f 72 73 2e |aised on| errors.|
|00000160| 0a 5c 65 6e 64 7b 64 61 | 74 61 64 65 73 63 7d 0a |.\end{da|tadesc}.|
|00000170| 0a 5c 62 65 67 69 6e 7b | 64 61 74 61 64 65 73 63 |.\begin{|datadesc|
|00000180| 7d 7b 63 6d 44 61 74 61 | 7d 0a 5c 64 61 74 61 6c |}{cmData|}.\datal|
|00000190| 69 6e 65 7b 63 6d 43 6e | 74 6c 7d 0a 5c 64 61 74 |ine{cmCn|tl}.\dat|
|000001a0| 61 6c 69 6e 65 7b 63 6d | 41 74 74 6e 7d 0a 46 6c |aline{cm|Attn}.Fl|
|000001b0| 61 67 73 20 66 6f 72 20 | 74 68 65 20 5c 76 61 72 |ags for |the \var|
|000001c0| 7b 63 68 61 6e 6e 65 6c | 7d 20 61 72 67 75 6d 65 |{channel|} argume|
|000001d0| 6e 74 20 6f 66 20 74 68 | 65 20 5c 76 61 72 7b 52 |nt of th|e \var{R|
|000001e0| 65 61 64 7d 20 61 6e 64 | 20 5c 76 61 72 7b 57 72 |ead} and| \var{Wr|
|000001f0| 69 74 65 7d 0a 6d 65 74 | 68 6f 64 73 2e 0a 5c 65 |ite}.met|hods..\e|
|00000200| 6e 64 7b 64 61 74 61 64 | 65 73 63 7d 0a 0a 5c 62 |nd{datad|esc}..\b|
|00000210| 65 67 69 6e 7b 64 61 74 | 61 64 65 73 63 7d 7b 63 |egin{dat|adesc}{c|
|00000220| 6d 46 6c 61 67 73 45 4f | 4d 7d 0a 45 6e 64 2d 6f |mFlagsEO|M}.End-o|
|00000230| 66 2d 6d 65 73 73 61 67 | 65 20 66 6c 61 67 20 66 |f-messag|e flag f|
|00000240| 6f 72 20 5c 76 61 72 7b | 52 65 61 64 7d 20 61 6e |or \var{|Read} an|
|00000250| 64 20 5c 76 61 72 7b 57 | 72 69 74 65 7d 2e 0a 5c |d \var{W|rite}..\|
|00000260| 65 6e 64 7b 64 61 74 61 | 64 65 73 63 7d 0a 0a 5c |end{data|desc}..\|
|00000270| 62 65 67 69 6e 7b 64 61 | 74 61 64 65 73 63 7d 7b |begin{da|tadesc}{|
|00000280| 63 68 6f 6f 73 65 2a 7d | 0a 56 61 6c 75 65 73 20 |choose*}|.Values |
|00000290| 72 65 74 75 72 6e 65 64 | 20 62 79 20 5c 76 61 72 |returned| by \var|
|000002a0| 7b 43 68 6f 6f 73 65 7d | 2e 0a 5c 65 6e 64 7b 64 |{Choose}|..\end{d|
|000002b0| 61 74 61 64 65 73 63 7d | 0a 0a 5c 62 65 67 69 6e |atadesc}|..\begin|
|000002c0| 7b 64 61 74 61 64 65 73 | 63 7d 7b 63 6d 53 74 61 |{datades|c}{cmSta|
|000002d0| 74 75 73 2a 7d 0a 42 69 | 74 73 20 69 6e 20 74 68 |tus*}.Bi|ts in th|
|000002e0| 65 20 73 74 61 74 75 73 | 20 61 73 20 72 65 74 75 |e status| as retu|
|000002f0| 72 6e 65 64 20 62 79 20 | 5c 76 61 72 7b 53 74 61 |rned by |\var{Sta|
|00000300| 74 75 73 7d 2e 0a 5c 65 | 6e 64 7b 64 61 74 61 64 |tus}..\e|nd{datad|
|00000310| 65 73 63 7d 0a 0a 5c 62 | 65 67 69 6e 7b 66 75 6e |esc}..\b|egin{fun|
|00000320| 63 64 65 73 63 7d 7b 61 | 76 61 69 6c 61 62 6c 65 |cdesc}{a|vailable|
|00000330| 7d 7b 7d 0a 52 65 74 75 | 72 6e 20 31 20 69 66 20 |}{}.Retu|rn 1 if |
|00000340| 74 68 65 20 63 6f 6d 6d | 75 6e 69 63 61 74 69 6f |the comm|unicatio|
|00000350| 6e 20 74 6f 6f 6c 62 6f | 78 20 69 73 20 61 76 61 |n toolbo|x is ava|
|00000360| 69 6c 61 62 6c 65 2c 20 | 7a 65 72 6f 20 6f 74 68 |ilable, |zero oth|
|00000370| 65 72 77 69 73 65 2e 0a | 5c 65 6e 64 7b 66 75 6e |erwise..|\end{fun|
|00000380| 63 64 65 73 63 7d 0a 0a | 5c 62 65 67 69 6e 7b 66 |cdesc}..|\begin{f|
|00000390| 75 6e 63 64 65 73 63 7d | 7b 43 4d 4e 65 77 7d 7b |uncdesc}|{CMNew}{|
|000003a0| 6e 61 6d 65 5c 2c 20 73 | 69 7a 65 73 7d 0a 43 72 |name\, s|izes}.Cr|
|000003b0| 65 61 74 65 20 61 20 63 | 6f 6e 6e 65 63 74 69 6f |eate a c|onnectio|
|000003c0| 6e 20 6f 62 6a 65 63 74 | 20 75 73 69 6e 67 20 74 |n object| using t|
|000003d0| 68 65 20 63 6f 6e 6e 65 | 63 74 69 6f 6e 20 74 6f |he conne|ction to|
|000003e0| 6f 6c 20 6e 61 6d 65 64 | 0a 5c 76 61 72 7b 6e 61 |ol named|.\var{na|
|000003f0| 6d 65 7d 2e 20 5c 76 61 | 72 7b 73 69 7a 65 73 7d |me}. \va|r{sizes}|
|00000400| 20 69 73 20 61 20 36 2d | 74 75 70 6c 65 20 67 69 | is a 6-|tuple gi|
|00000410| 76 65 6e 20 62 75 66 66 | 65 72 20 73 69 7a 65 73 |ven buff|er sizes|
|00000420| 20 66 6f 72 20 64 61 74 | 61 20 69 6e 2c 0a 64 61 | for dat|a in,.da|
|00000430| 74 61 20 6f 75 74 2c 20 | 63 6f 6e 74 72 6f 6c 20 |ta out, |control |
|00000440| 69 6e 2c 20 63 6f 6e 74 | 72 6f 6c 20 6f 75 74 2c |in, cont|rol out,|
|00000450| 20 61 74 74 65 6e 74 69 | 6f 6e 20 69 6e 20 61 6e | attenti|on in an|
|00000460| 64 20 61 74 74 65 6e 74 | 69 6f 6e 20 6f 75 74 2e |d attent|ion out.|
|00000470| 0a 41 6c 74 65 72 6e 61 | 74 69 76 65 6c 79 2c 20 |.Alterna|tively, |
|00000480| 70 61 73 73 69 6e 67 20 | 5c 63 6f 64 65 7b 4e 6f |passing |\code{No|
|00000490| 6e 65 7d 20 77 69 6c 6c | 20 72 65 73 75 6c 74 20 |ne} will| result |
|000004a0| 69 6e 20 64 65 66 61 75 | 6c 74 20 62 75 66 66 65 |in defau|lt buffe|
|000004b0| 72 20 73 69 7a 65 73 2e | 0a 5c 65 6e 64 7b 66 75 |r sizes.|.\end{fu|
|000004c0| 6e 63 64 65 73 63 7d 0a | 0a 5c 73 75 62 73 65 63 |ncdesc}.|.\subsec|
|000004d0| 74 69 6f 6e 7b 63 6f 6e | 6e 65 63 74 69 6f 6e 20 |tion{con|nection |
|000004e0| 6f 62 6a 65 63 74 7d 0a | 46 6f 72 20 61 6c 6c 20 |object}.|For all |
|000004f0| 63 6f 6e 6e 65 63 74 69 | 6f 6e 20 6d 65 74 68 6f |connecti|on metho|
|00000500| 64 73 20 74 68 61 74 20 | 74 61 6b 65 20 61 20 5c |ds that |take a \|
|00000510| 76 61 72 7b 74 69 6d 65 | 6f 75 74 7d 20 61 72 67 |var{time|out} arg|
|00000520| 75 6d 65 6e 74 2c 20 61 | 20 76 61 6c 75 65 0a 6f |ument, a| value.o|
|00000530| 66 20 5c 63 6f 64 65 7b | 2d 31 7d 20 69 73 20 69 |f \code{|-1} is i|
|00000540| 6e 64 65 66 69 6e 69 74 | 65 2c 20 6d 65 61 6e 69 |ndefinit|e, meani|
|00000550| 6e 67 20 74 68 61 74 20 | 74 68 65 20 63 6f 6d 6d |ng that |the comm|
|00000560| 61 6e 64 20 72 75 6e 73 | 20 74 6f 20 63 6f 6d 70 |and runs| to comp|
|00000570| 6c 65 74 69 6f 6e 2e 0a | 0a 5c 72 65 6e 65 77 63 |letion..|.\renewc|
|00000580| 6f 6d 6d 61 6e 64 7b 5c | 69 6e 64 65 78 73 75 62 |ommand{\|indexsub|
|00000590| 69 74 65 6d 7d 7b 28 63 | 6f 6e 6e 65 63 74 69 6f |item}{(c|onnectio|
|000005a0| 6e 20 6f 62 6a 65 63 74 | 20 61 74 74 72 69 62 75 |n object| attribu|
|000005b0| 74 65 29 7d 0a 0a 5c 62 | 65 67 69 6e 7b 64 61 74 |te)}..\b|egin{dat|
|000005c0| 61 64 65 73 63 7d 7b 63 | 61 6c 6c 62 61 63 6b 7d |adesc}{c|allback}|
|000005d0| 0a 49 66 20 74 68 69 73 | 20 6d 65 6d 62 65 72 20 |.If this| member |
|000005e0| 69 73 20 73 65 74 20 74 | 6f 20 61 20 76 61 6c 75 |is set t|o a valu|
|000005f0| 65 20 6f 74 68 65 72 20 | 74 68 61 6e 20 5c 63 6f |e other |than \co|
|00000600| 64 65 7b 4e 6f 6e 65 7d | 20 69 74 20 73 68 6f 75 |de{None}| it shou|
|00000610| 6c 64 20 70 6f 69 6e 74 | 0a 74 6f 20 61 20 66 75 |ld point|.to a fu|
|00000620| 6e 63 74 69 6f 6e 20 61 | 63 63 65 70 74 69 6e 67 |nction a|ccepting|
|00000630| 20 61 20 73 69 6e 67 6c | 65 20 61 72 67 75 6d 65 | a singl|e argume|
|00000640| 6e 74 20 28 74 68 65 20 | 63 6f 6e 6e 65 63 74 69 |nt (the |connecti|
|00000650| 6f 6e 0a 6f 62 6a 65 63 | 74 29 2e 20 54 68 69 73 |on.objec|t). This|
|00000660| 20 77 69 6c 6c 20 6d 61 | 6b 65 20 61 6c 6c 20 63 | will ma|ke all c|
|00000670| 6f 6e 6e 65 63 74 69 6f | 6e 20 6f 62 6a 65 63 74 |onnectio|n object|
|00000680| 20 6d 65 74 68 6f 64 73 | 20 77 6f 72 6b 0a 61 73 | methods| work.as|
|00000690| 79 6e 63 68 72 6f 6e 6f | 75 73 6c 79 2c 20 77 69 |ynchrono|usly, wi|
|000006a0| 74 68 20 74 68 65 20 63 | 61 6c 6c 62 61 63 6b 20 |th the c|allback |
|000006b0| 72 6f 75 74 69 6e 65 20 | 62 65 69 6e 67 20 63 61 |routine |being ca|
|000006c0| 6c 6c 65 64 20 75 70 6f | 6e 0a 63 6f 6d 70 6c 65 |lled upo|n.comple|
|000006d0| 74 69 6f 6e 2e 0a 0a 7b | 5c 65 6d 20 4e 6f 74 65 |tion...{|\em Note|
|000006e0| 3a 7d 20 66 6f 72 20 72 | 65 61 73 6f 6e 73 20 62 |:} for r|easons b|
|000006f0| 65 79 6f 6e 64 20 6d 79 | 20 75 6e 64 65 72 73 74 |eyond my| underst|
|00000700| 61 6e 64 69 6e 67 20 74 | 68 65 20 63 61 6c 6c 62 |anding t|he callb|
|00000710| 61 63 6b 20 72 6f 75 74 | 69 6e 65 0a 69 73 20 63 |ack rout|ine.is c|
|00000720| 75 72 72 65 6e 74 6c 79 | 20 6e 65 76 65 72 20 63 |urrently| never c|
|00000730| 61 6c 6c 65 64 2e 20 59 | 6f 75 20 61 72 65 20 61 |alled. Y|ou are a|
|00000740| 64 76 69 73 65 64 20 61 | 67 61 69 6e 73 74 20 75 |dvised a|gainst u|
|00000750| 73 69 6e 67 20 61 73 79 | 6e 63 68 72 6f 6e 6f 75 |sing asy|nchronou|
|00000760| 73 0a 63 61 6c 6c 73 20 | 66 6f 72 20 74 68 65 20 |s.calls |for the |
|00000770| 74 69 6d 65 20 62 65 69 | 6e 67 2e 0a 5c 65 6e 64 |time bei|ng..\end|
|00000780| 7b 64 61 74 61 64 65 73 | 63 7d 0a 0a 0a 5c 72 65 |{datades|c}...\re|
|00000790| 6e 65 77 63 6f 6d 6d 61 | 6e 64 7b 5c 69 6e 64 65 |newcomma|nd{\inde|
|000007a0| 78 73 75 62 69 74 65 6d | 7d 7b 28 63 6f 6e 6e 65 |xsubitem|}{(conne|
|000007b0| 63 74 69 6f 6e 20 6f 62 | 6a 65 63 74 20 6d 65 74 |ction ob|ject met|
|000007c0| 68 6f 64 29 7d 0a 0a 5c | 62 65 67 69 6e 7b 66 75 |hod)}..\|begin{fu|
|000007d0| 6e 63 64 65 73 63 7d 7b | 4f 70 65 6e 7d 7b 74 69 |ncdesc}{|Open}{ti|
|000007e0| 6d 65 6f 75 74 7d 0a 4f | 70 65 6e 20 61 6e 20 6f |meout}.O|pen an o|
|000007f0| 75 74 67 6f 69 6e 67 20 | 63 6f 6e 6e 65 63 74 69 |utgoing |connecti|
|00000800| 6f 6e 2c 20 77 61 69 74 | 69 6e 67 20 61 74 20 6d |on, wait|ing at m|
|00000810| 6f 73 74 20 5c 76 61 72 | 7b 74 69 6d 65 6f 75 74 |ost \var|{timeout|
|00000820| 7d 20 73 65 63 6f 6e 64 | 73 20 66 6f 72 0a 74 68 |} second|s for.th|
|00000830| 65 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 20 74 6f 20 |e connec|tion to |
|00000840| 62 65 20 65 73 74 61 62 | 6c 69 73 68 65 64 2e 0a |be estab|lished..|
|00000850| 5c 65 6e 64 7b 66 75 6e | 63 64 65 73 63 7d 0a 0a |\end{fun|cdesc}..|
|00000860| 5c 62 65 67 69 6e 7b 66 | 75 6e 63 64 65 73 63 7d |\begin{f|uncdesc}|
|00000870| 7b 4c 69 73 74 65 6e 7d | 7b 74 69 6d 65 6f 75 74 |{Listen}|{timeout|
|00000880| 7d 0a 57 61 69 74 20 66 | 6f 72 20 61 6e 20 69 6e |}.Wait f|or an in|
|00000890| 63 6f 6d 69 6e 67 20 63 | 6f 6e 6e 65 63 74 69 6f |coming c|onnectio|
|000008a0| 6e 2e 20 53 74 6f 70 20 | 77 61 69 74 69 6e 67 20 |n. Stop |waiting |
|000008b0| 61 66 74 65 72 20 5c 76 | 61 72 7b 74 69 6d 65 6f |after \v|ar{timeo|
|000008c0| 75 74 7d 0a 73 65 63 6f | 6e 64 73 2e 20 54 68 69 |ut}.seco|nds. Thi|
|000008d0| 73 20 63 61 6c 6c 20 69 | 73 20 6f 6e 6c 79 20 6d |s call i|s only m|
|000008e0| 65 61 6e 69 6e 67 66 75 | 6c 20 74 6f 20 73 6f 6d |eaningfu|l to som|
|000008f0| 65 20 74 6f 6f 6c 73 2e | 0a 5c 65 6e 64 7b 66 75 |e tools.|.\end{fu|
|00000900| 6e 63 64 65 73 63 7d 0a | 0a 5c 62 65 67 69 6e 7b |ncdesc}.|.\begin{|
|00000910| 66 75 6e 63 64 65 73 63 | 7d 7b 61 63 63 65 70 74 |funcdesc|}{accept|
|00000920| 7d 7b 79 65 73 6e 6f 7d | 0a 41 63 63 65 70 74 20 |}{yesno}|.Accept |
|00000930| 28 77 68 65 6e 20 5c 76 | 61 72 7b 79 65 73 6e 6f |(when \v|ar{yesno|
|00000940| 7d 20 69 73 20 6e 6f 6e | 2d 7a 65 72 6f 29 20 6f |} is non|-zero) o|
|00000950| 72 20 72 65 6a 65 63 74 | 20 61 6e 20 69 6e 63 6f |r reject| an inco|
|00000960| 6d 69 6e 67 20 63 61 6c | 6c 20 61 66 74 65 72 0a |ming cal|l after.|
|00000970| 5c 76 61 72 7b 4c 69 73 | 74 65 6e 7d 20 72 65 74 |\var{Lis|ten} ret|
|00000980| 75 72 6e 65 64 2e 0a 5c | 65 6e 64 7b 66 75 6e 63 |urned..\|end{func|
|00000990| 64 65 73 63 7d 0a 0a 5c | 62 65 67 69 6e 7b 66 75 |desc}..\|begin{fu|
|000009a0| 6e 63 64 65 73 63 7d 7b | 43 6c 6f 73 65 7d 7b 74 |ncdesc}{|Close}{t|
|000009b0| 69 6d 65 6f 75 74 5c 2c | 20 6e 6f 77 7d 0a 43 6c |imeout\,| now}.Cl|
|000009c0| 6f 73 65 20 61 20 63 6f | 6e 6e 65 63 74 69 6f 6e |ose a co|nnection|
|000009d0| 2e 20 57 68 65 6e 20 5c | 76 61 72 7b 6e 6f 77 7d |. When \|var{now}|
|000009e0| 20 69 73 20 7a 65 72 6f | 2c 20 74 68 65 20 63 6c | is zero|, the cl|
|000009f0| 6f 73 65 20 69 73 20 6f | 72 64 65 72 6c 79 0a 28 |ose is o|rderly.(|
|00000a00| 69 2e 65 2e 5c 20 6f 75 | 74 73 74 61 6e 64 69 6e |i.e.\ ou|tstandin|
|00000a10| 67 20 6f 75 74 70 75 74 | 20 69 73 20 66 6c 75 73 |g output| is flus|
|00000a20| 68 65 64 2c 20 65 74 63 | 2e 29 5c 20 77 69 74 68 |hed, etc|.)\ with|
|00000a30| 20 61 20 74 69 6d 65 6f | 75 74 20 6f 66 0a 5c 76 | a timeo|ut of.\v|
|00000a40| 61 72 7b 74 69 6d 65 6f | 75 74 7d 20 73 65 63 6f |ar{timeo|ut} seco|
|00000a50| 6e 64 73 2e 20 57 68 65 | 6e 20 5c 76 61 72 7b 6e |nds. Whe|n \var{n|
|00000a60| 6f 77 7d 20 69 73 20 6e | 6f 6e 2d 7a 65 72 6f 20 |ow} is n|on-zero |
|00000a70| 74 68 65 20 63 6c 6f 73 | 65 20 69 73 0a 69 6d 6d |the clos|e is.imm|
|00000a80| 65 64 69 61 74 65 2c 20 | 64 69 73 63 61 72 64 69 |ediate, |discardi|
|00000a90| 6e 67 20 6f 75 74 70 75 | 74 2e 0a 5c 65 6e 64 7b |ng outpu|t..\end{|
|00000aa0| 66 75 6e 63 64 65 73 63 | 7d 0a 0a 5c 62 65 67 69 |funcdesc|}..\begi|
|00000ab0| 6e 7b 66 75 6e 63 64 65 | 73 63 7d 7b 52 65 61 64 |n{funcde|sc}{Read|
|00000ac0| 7d 7b 6c 65 6e 5c 2c 20 | 63 68 61 6e 5c 2c 20 74 |}{len\, |chan\, t|
|00000ad0| 69 6d 65 6f 75 74 7d 0a | 52 65 61 64 20 5c 76 61 |imeout}.|Read \va|
|00000ae0| 72 7b 6c 65 6e 7d 20 62 | 79 74 65 73 2c 20 6f 72 |r{len} b|ytes, or|
|00000af0| 20 75 6e 74 69 6c 20 5c | 76 61 72 7b 74 69 6d 65 | until \|var{time|
|00000b00| 6f 75 74 7d 20 73 65 63 | 6f 6e 64 73 20 68 61 76 |out} sec|onds hav|
|00000b10| 65 20 70 61 73 73 65 64 | 2c 20 66 72 6f 6d 0a 74 |e passed|, from.t|
|00000b20| 68 65 20 63 68 61 6e 6e | 65 6c 20 5c 76 61 72 7b |he chann|el \var{|
|00000b30| 63 68 61 6e 7d 20 28 77 | 68 69 63 68 20 69 73 20 |chan} (w|hich is |
|00000b40| 6f 6e 65 20 6f 66 20 5c | 76 61 72 7b 63 6d 44 61 |one of \|var{cmDa|
|00000b50| 74 61 7d 2c 20 5c 76 61 | 72 7b 63 6d 43 6e 74 6c |ta}, \va|r{cmCntl|
|00000b60| 7d 20 6f 72 0a 5c 76 61 | 72 7b 63 6d 41 74 74 6e |} or.\va|r{cmAttn|
|00000b70| 7d 29 2e 20 52 65 74 75 | 72 6e 20 61 20 32 2d 74 |}). Retu|rn a 2-t|
|00000b80| 75 70 6c 65 3a 5c 20 74 | 68 65 20 64 61 74 61 20 |uple:\ t|he data |
|00000b90| 72 65 61 64 20 61 6e 64 | 20 74 68 65 20 65 6e 64 |read and| the end|
|00000ba0| 2d 6f 66 2d 6d 65 73 73 | 61 67 65 0a 66 6c 61 67 |-of-mess|age.flag|
|00000bb0| 2e 0a 5c 65 6e 64 7b 66 | 75 6e 63 64 65 73 63 7d |..\end{f|uncdesc}|
|00000bc0| 0a 0a 5c 62 65 67 69 6e | 7b 66 75 6e 63 64 65 73 |..\begin|{funcdes|
|00000bd0| 63 7d 7b 57 72 69 74 65 | 7d 7b 62 75 66 5c 2c 20 |c}{Write|}{buf\, |
|00000be0| 63 68 61 6e 5c 2c 20 74 | 69 6d 65 6f 75 74 5c 2c |chan\, t|imeout\,|
|00000bf0| 20 65 6f 6d 7d 0a 57 72 | 69 74 65 20 5c 76 61 72 | eom}.Wr|ite \var|
|00000c00| 7b 62 75 66 7d 20 74 6f | 20 63 68 61 6e 6e 65 6c |{buf} to| channel|
|00000c10| 20 5c 76 61 72 7b 63 68 | 61 6e 7d 2c 20 61 62 6f | \var{ch|an}, abo|
|00000c20| 72 74 69 6e 67 20 61 66 | 74 65 72 20 5c 76 61 72 |rting af|ter \var|
|00000c30| 7b 74 69 6d 65 6f 75 74 | 7d 0a 73 65 63 6f 6e 64 |{timeout|}.second|
|00000c40| 73 2e 20 57 68 65 6e 20 | 5c 76 61 72 7b 65 6f 6d |s. When |\var{eom|
|00000c50| 7d 20 68 61 73 20 74 68 | 65 20 76 61 6c 75 65 20 |} has th|e value |
|00000c60| 5c 76 61 72 7b 63 6d 46 | 6c 61 67 73 45 4f 4d 7d |\var{cmF|lagsEOM}|
|00000c70| 20 61 6e 0a 65 6e 64 2d | 6f 66 2d 6d 65 73 73 61 | an.end-|of-messa|
|00000c80| 67 65 20 69 6e 64 69 63 | 61 74 6f 72 20 77 69 6c |ge indic|ator wil|
|00000c90| 6c 20 62 65 20 77 72 69 | 74 74 65 6e 20 61 66 74 |l be wri|tten aft|
|00000ca0| 65 72 20 74 68 65 20 64 | 61 74 61 20 28 69 66 20 |er the d|ata (if |
|00000cb0| 74 68 69 73 0a 63 6f 6e | 63 65 70 74 20 68 61 73 |this.con|cept has|
|00000cc0| 20 61 20 6d 65 61 6e 69 | 6e 67 20 66 6f 72 20 74 | a meani|ng for t|
|00000cd0| 68 69 73 20 63 6f 6d 6d | 75 6e 69 63 61 74 69 6f |his comm|unicatio|
|00000ce0| 6e 20 74 6f 6f 6c 29 2e | 20 54 68 65 20 6d 65 74 |n tool).| The met|
|00000cf0| 68 6f 64 20 72 65 74 75 | 72 6e 73 0a 74 68 65 20 |hod retu|rns.the |
|00000d00| 6e 75 6d 62 65 72 20 6f | 66 20 62 79 74 65 73 20 |number o|f bytes |
|00000d10| 77 72 69 74 74 65 6e 2e | 0a 5c 65 6e 64 7b 66 75 |written.|.\end{fu|
|00000d20| 6e 63 64 65 73 63 7d 0a | 0a 5c 62 65 67 69 6e 7b |ncdesc}.|.\begin{|
|00000d30| 66 75 6e 63 64 65 73 63 | 7d 7b 53 74 61 74 75 73 |funcdesc|}{Status|
|00000d40| 7d 7b 7d 0a 52 65 74 75 | 72 6e 20 63 6f 6e 6e 65 |}{}.Retu|rn conne|
|00000d50| 63 74 69 6f 6e 20 73 74 | 61 74 75 73 20 61 73 20 |ction st|atus as |
|00000d60| 74 68 65 20 32 2d 74 75 | 70 6c 65 20 5c 63 6f 64 |the 2-tu|ple \cod|
|00000d70| 65 7b 28 5c 76 61 72 7b | 73 69 7a 65 73 7d 2c 0a |e{(\var{|sizes},.|
|00000d80| 5c 76 61 72 7b 66 6c 61 | 67 73 7d 29 7d 2e 20 5c |\var{fla|gs})}. \|
|00000d90| 76 61 72 7b 73 69 7a 65 | 73 7d 20 69 73 20 61 20 |var{size|s} is a |
|00000da0| 36 2d 74 75 70 6c 65 20 | 67 69 76 69 6e 67 20 74 |6-tuple |giving t|
|00000db0| 68 65 20 61 63 74 75 61 | 6c 20 62 75 66 66 65 72 |he actua|l buffer|
|00000dc0| 20 73 69 7a 65 73 20 75 | 73 65 64 0a 28 73 65 65 | sizes u|sed.(see|
|00000dd0| 20 5c 76 61 72 7b 43 4d | 4e 65 77 7d 29 2c 20 5c | \var{CM|New}), \|
|00000de0| 76 61 72 7b 66 6c 61 67 | 73 7d 20 69 73 20 61 20 |var{flag|s} is a |
|00000df0| 73 65 74 20 6f 66 20 62 | 69 74 73 20 64 65 73 63 |set of b|its desc|
|00000e00| 72 69 62 69 6e 67 20 74 | 68 65 20 73 74 61 74 65 |ribing t|he state|
|00000e10| 0a 6f 66 20 74 68 65 20 | 63 6f 6e 6e 65 63 74 69 |.of the |connecti|
|00000e20| 6f 6e 2e 0a 5c 65 6e 64 | 7b 66 75 6e 63 64 65 73 |on..\end|{funcdes|
|00000e30| 63 7d 0a 0a 5c 62 65 67 | 69 6e 7b 66 75 6e 63 64 |c}..\beg|in{funcd|
|00000e40| 65 73 63 7d 7b 47 65 74 | 43 6f 6e 66 69 67 7d 7b |esc}{Get|Config}{|
|00000e50| 7d 0a 52 65 74 75 72 6e | 20 74 68 65 20 63 6f 6e |}.Return| the con|
|00000e60| 66 69 67 75 72 61 74 69 | 6f 6e 20 73 74 72 69 6e |figurati|on strin|
|00000e70| 67 20 6f 66 20 74 68 65 | 20 63 6f 6d 6d 75 6e 69 |g of the| communi|
|00000e80| 63 61 74 69 6f 6e 20 74 | 6f 6f 6c 2e 20 54 68 65 |cation t|ool. The|
|00000e90| 73 65 0a 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e |se.confi|guration|
|00000ea0| 20 73 74 72 69 6e 67 73 | 20 61 72 65 20 74 6f 6f | strings| are too|
|00000eb0| 6c 2d 64 65 70 65 6e 64 | 65 6e 74 2c 20 62 75 74 |l-depend|ent, but|
|00000ec0| 20 75 73 75 61 6c 6c 79 | 20 65 61 73 69 6c 79 20 | usually| easily |
|00000ed0| 70 61 72 73 65 64 0a 61 | 6e 64 20 6d 6f 64 69 66 |parsed.a|nd modif|
|00000ee0| 69 65 64 2e 0a 5c 65 6e | 64 7b 66 75 6e 63 64 65 |ied..\en|d{funcde|
|00000ef0| 73 63 7d 0a 0a 5c 62 65 | 67 69 6e 7b 66 75 6e 63 |sc}..\be|gin{func|
|00000f00| 64 65 73 63 7d 7b 53 65 | 74 43 6f 6e 66 69 67 7d |desc}{Se|tConfig}|
|00000f10| 7b 73 74 72 7d 0a 53 65 | 74 20 74 68 65 20 63 6f |{str}.Se|t the co|
|00000f20| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 73 74 72 69 |nfigurat|ion stri|
|00000f30| 6e 67 20 66 6f 72 20 74 | 68 65 20 74 6f 6f 6c 2e |ng for t|he tool.|
|00000f40| 20 54 68 65 20 73 74 72 | 69 6e 67 73 20 61 72 65 | The str|ings are|
|00000f50| 20 70 61 72 73 65 64 0a | 6c 65 66 74 2d 74 6f 2d | parsed.|left-to-|
|00000f60| 72 69 67 68 74 2c 20 77 | 69 74 68 20 6c 61 74 65 |right, w|ith late|
|00000f70| 72 20 76 61 6c 75 65 73 | 20 74 61 6b 69 6e 67 20 |r values| taking |
|00000f80| 70 72 65 63 65 64 65 6e | 63 65 2e 20 54 68 69 73 |preceden|ce. This|
|00000f90| 20 6d 65 61 6e 73 0a 69 | 6e 64 69 76 69 64 75 61 | means.i|ndividua|
|00000fa0| 6c 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |l config|uration |
|00000fb0| 70 61 72 61 6d 65 74 65 | 72 73 20 63 61 6e 20 62 |paramete|rs can b|
|00000fc0| 65 20 6d 6f 64 69 66 69 | 65 64 20 62 79 20 73 69 |e modifi|ed by si|
|00000fd0| 6d 70 6c 79 20 61 70 70 | 65 6e 64 69 6e 67 0a 73 |mply app|ending.s|
|00000fe0| 6f 6d 65 74 68 69 6e 67 | 20 6c 69 6b 65 20 5c 63 |omething| like \c|
|00000ff0| 6f 64 65 7b 27 62 61 75 | 64 20 34 38 30 30 27 7d |ode{'bau|d 4800'}|
|00001000| 20 74 6f 20 74 68 65 20 | 65 6e 64 20 6f 66 20 74 | to the |end of t|
|00001010| 68 65 20 73 74 72 69 6e | 67 20 72 65 74 75 72 6e |he strin|g return|
|00001020| 65 64 20 62 79 0a 5c 76 | 61 72 7b 47 65 74 43 6f |ed by.\v|ar{GetCo|
|00001030| 6e 66 69 67 7d 20 61 6e | 64 20 70 61 73 73 69 6e |nfig} an|d passin|
|00001040| 67 20 74 68 61 74 20 74 | 6f 20 74 68 69 73 20 6d |g that t|o this m|
|00001050| 65 74 68 6f 64 2e 20 54 | 68 65 20 6d 65 74 68 6f |ethod. T|he metho|
|00001060| 64 20 72 65 74 75 72 6e | 73 0a 74 68 65 20 6e 75 |d return|s.the nu|
|00001070| 6d 62 65 72 20 6f 66 20 | 63 68 61 72 61 63 74 65 |mber of |characte|
|00001080| 72 73 20 61 63 74 75 61 | 6c 6c 79 20 70 61 72 73 |rs actua|lly pars|
|00001090| 65 64 20 62 79 20 74 68 | 65 20 74 6f 6f 6c 20 62 |ed by th|e tool b|
|000010a0| 65 66 6f 72 65 20 69 74 | 0a 65 6e 63 6f 75 6e 74 |efore it|.encount|
|000010b0| 65 72 65 64 20 61 6e 20 | 65 72 72 6f 72 20 28 6f |ered an |error (o|
|000010c0| 72 20 63 6f 6d 70 6c 65 | 74 65 64 20 73 75 63 63 |r comple|ted succ|
|000010d0| 65 73 73 66 75 6c 6c 79 | 29 2e 0a 5c 65 6e 64 7b |essfully|)..\end{|
|000010e0| 66 75 6e 63 64 65 73 63 | 7d 0a 0a 5c 62 65 67 69 |funcdesc|}..\begi|
|000010f0| 6e 7b 66 75 6e 63 64 65 | 73 63 7d 7b 43 68 6f 6f |n{funcde|sc}{Choo|
|00001100| 73 65 7d 7b 7d 0a 50 72 | 65 73 65 6e 74 20 74 68 |se}{}.Pr|esent th|
|00001110| 65 20 75 73 65 72 20 77 | 69 74 68 20 61 20 64 69 |e user w|ith a di|
|00001120| 61 6c 6f 67 20 74 6f 20 | 63 68 6f 6f 73 65 20 61 |alog to |choose a|
|00001130| 20 63 6f 6d 6d 75 6e 69 | 63 61 74 69 6f 6e 20 74 | communi|cation t|
|00001140| 6f 6f 6c 20 61 6e 64 0a | 63 6f 6e 66 69 67 75 72 |ool and.|configur|
|00001150| 65 20 69 74 2e 20 49 66 | 20 74 68 65 72 65 20 69 |e it. If| there i|
|00001160| 73 20 61 6e 20 6f 75 74 | 73 74 61 6e 64 69 6e 67 |s an out|standing|
|00001170| 20 63 6f 6e 6e 65 63 74 | 69 6f 6e 20 73 6f 6d 65 | connect|ion some|
|00001180| 20 63 68 6f 69 63 65 73 | 20 28 6c 69 6b 65 0a 73 | choices| (like.s|
|00001190| 65 6c 65 63 74 69 6e 67 | 20 61 20 64 69 66 66 65 |electing| a diffe|
|000011a0| 72 65 6e 74 20 74 6f 6f | 6c 29 20 6d 61 79 20 63 |rent too|l) may c|
|000011b0| 61 75 73 65 20 74 68 65 | 20 63 6f 6e 6e 65 63 74 |ause the| connect|
|000011c0| 69 6f 6e 20 74 6f 20 62 | 65 0a 61 62 6f 72 74 65 |ion to b|e.aborte|
|000011d0| 64 2e 20 54 68 65 20 72 | 65 74 75 72 6e 20 76 61 |d. The r|eturn va|
|000011e0| 6c 75 65 20 28 6f 6e 65 | 20 6f 66 20 74 68 65 20 |lue (one| of the |
|000011f0| 5c 76 61 72 7b 63 68 6f | 6f 73 65 2a 7d 20 63 6f |\var{cho|ose*} co|
|00001200| 6e 73 74 61 6e 74 73 29 | 20 77 69 6c 6c 0a 69 6e |nstants)| will.in|
|00001210| 64 69 63 61 74 65 20 74 | 68 69 73 2e 0a 5c 65 6e |dicate t|his..\en|
|00001220| 64 7b 66 75 6e 63 64 65 | 73 63 7d 0a 0a 5c 62 65 |d{funcde|sc}..\be|
|00001230| 67 69 6e 7b 66 75 6e 63 | 64 65 73 63 7d 7b 49 64 |gin{func|desc}{Id|
|00001240| 6c 65 7d 7b 7d 0a 47 69 | 76 65 20 74 68 65 20 74 |le}{}.Gi|ve the t|
|00001250| 6f 6f 6c 20 61 20 63 68 | 61 6e 63 65 20 74 6f 20 |ool a ch|ance to |
|00001260| 75 73 65 20 74 68 65 20 | 70 72 6f 63 65 73 73 6f |use the |processo|
|00001270| 72 2e 20 59 6f 75 20 73 | 68 6f 75 6c 64 20 63 61 |r. You s|hould ca|
|00001280| 6c 6c 20 74 68 69 73 0a | 6d 65 74 68 6f 64 20 72 |ll this.|method r|
|00001290| 65 67 75 6c 61 72 6c 79 | 2e 0a 5c 65 6e 64 7b 66 |egularly|..\end{f|
|000012a0| 75 6e 63 64 65 73 63 7d | 0a 0a 5c 62 65 67 69 6e |uncdesc}|..\begin|
|000012b0| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 41 62 6f 72 74 |{funcdes|c}{Abort|
|000012c0| 7d 7b 7d 0a 41 62 6f 72 | 74 20 61 6e 20 6f 75 74 |}{}.Abor|t an out|
|000012d0| 73 74 61 6e 64 69 6e 67 | 20 61 73 79 6e 63 68 72 |standing| asynchr|
|000012e0| 6f 6e 6f 75 73 20 5c 76 | 61 72 7b 4f 70 65 6e 7d |onous \v|ar{Open}|
|000012f0| 20 6f 72 20 5c 76 61 72 | 7b 4c 69 73 74 65 6e 7d | or \var|{Listen}|
|00001300| 2e 0a 5c 65 6e 64 7b 66 | 75 6e 63 64 65 73 63 7d |..\end{f|uncdesc}|
|00001310| 0a 0a 5c 62 65 67 69 6e | 7b 66 75 6e 63 64 65 73 |..\begin|{funcdes|
|00001320| 63 7d 7b 52 65 73 65 74 | 7d 7b 7d 0a 52 65 73 65 |c}{Reset|}{}.Rese|
|00001330| 74 20 61 20 63 6f 6e 6e | 65 63 74 69 6f 6e 2e 20 |t a conn|ection. |
|00001340| 45 78 61 63 74 20 6d 65 | 61 6e 69 6e 67 20 64 65 |Exact me|aning de|
|00001350| 70 65 6e 64 73 20 6f 6e | 20 74 68 65 20 74 6f 6f |pends on| the too|
|00001360| 6c 2e 0a 5c 65 6e 64 7b | 66 75 6e 63 64 65 73 63 |l..\end{|funcdesc|
|00001370| 7d 0a 0a 5c 62 65 67 69 | 6e 7b 66 75 6e 63 64 65 |}..\begi|n{funcde|
|00001380| 73 63 7d 7b 42 72 65 61 | 6b 7d 7b 6c 65 6e 67 74 |sc}{Brea|k}{lengt|
|00001390| 68 7d 0a 53 65 6e 64 20 | 61 20 62 72 65 61 6b 2e |h}.Send |a break.|
|000013a0| 20 57 68 65 74 68 65 72 | 20 74 68 69 73 20 6d 65 | Whether| this me|
|000013b0| 61 6e 73 20 61 6e 79 74 | 68 69 6e 67 2c 20 77 68 |ans anyt|hing, wh|
|000013c0| 61 74 20 69 74 20 6d 65 | 61 6e 73 20 61 6e 64 0a |at it me|ans and.|
|000013d0| 69 6e 74 65 72 70 72 65 | 74 61 74 69 6f 6e 20 6f |interpre|tation o|
|000013e0| 66 20 74 68 65 20 5c 76 | 61 72 7b 6c 65 6e 67 74 |f the \v|ar{lengt|
|000013f0| 68 7d 20 70 61 72 61 6d | 65 74 65 72 20 64 65 70 |h} param|eter dep|
|00001400| 65 6e 64 20 6f 6e 20 74 | 68 65 20 74 6f 6f 6c 20 |end on t|he tool |
|00001410| 69 6e 0a 75 73 65 2e 0a | 5c 65 6e 64 7b 66 75 6e |in.use..|\end{fun|
|00001420| 63 64 65 73 63 7d 0a | |cdesc}. | |
+--------+-------------------------+-------------------------+--------+--------+