home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / perl / scripts-osu / easy-serv.shar < prev    next >
SHell self-extracting ARchive  |  1990-11-17  |  14.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: SHell self-extracting ARchive (archive/shar).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: Plain text[LF] default
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 74 75 | 74 2e 63 69 73 2e 6f 68 |Path: tu|t.cis.oh|
|00000010| 69 6f 2d 73 74 61 74 65 | 2e 65 64 75 21 73 6f 6c |io-state|.edu!sol|
|00000020| 6f 21 63 73 2e 75 74 65 | 78 61 73 2e 65 64 75 21 |o!cs.ute|xas.edu!|
|00000030| 73 79 6e 6f 70 74 69 63 | 73 21 6d 69 70 73 21 7a |synoptic|s!mips!z|
|00000040| 61 70 68 6f 64 2e 6d 70 | 73 2e 6f 68 69 6f 2d 73 |aphod.mp|s.ohio-s|
|00000050| 74 61 74 65 2e 65 64 75 | 21 70 61 63 69 66 69 63 |tate.edu|!pacific|
|00000060| 2e 6d 70 73 2e 6f 68 69 | 6f 2d 73 74 61 74 65 2e |.mps.ohi|o-state.|
|00000070| 65 64 75 21 6c 69 6e 61 | 63 21 61 74 74 21 62 65 |edu!lina|c!att!be|
|00000080| 6c 6c 63 6f 72 65 21 75 | 75 6e 65 74 21 73 72 61 |llcore!u|unet!sra|
|00000090| 63 6f 31 21 73 61 6b 6f | 68 0a 46 72 6f 6d 3a 20 |co1!sako|h.From: |
|000000a0| 73 61 6b 6f 68 40 73 72 | 61 63 6f 32 2e 75 73 2e |sakoh@sr|aco2.us.|
|000000b0| 73 72 61 2e 63 6f 2e 6a | 70 20 28 48 69 72 6f 73 |sra.co.j|p (Hiros|
|000000c0| 68 69 20 26 29 0a 4e 65 | 77 73 67 72 6f 75 70 73 |hi &).Ne|wsgroups|
|000000d0| 3a 20 63 6f 6d 70 2e 6c | 61 6e 67 2e 70 65 72 6c |: comp.l|ang.perl|
|000000e0| 0a 53 75 62 6a 65 63 74 | 3a 20 65 61 73 79 2d 73 |.Subject|: easy-s|
|000000f0| 65 72 76 2e 70 6c 20 3a | 20 61 20 73 69 6d 70 6c |erv.pl :| a simpl|
|00000100| 65 20 73 65 72 76 65 72 | 2f 63 6c 69 65 6e 74 20 |e server|/client |
|00000110| 70 72 6f 67 72 61 6d 20 | 6c 69 62 72 61 72 79 0a |program |library.|
|00000120| 4d 65 73 73 61 67 65 2d | 49 44 3a 20 3c 53 41 4b |Message-|ID: <SAK|
|00000130| 4f 48 2e 39 30 4e 6f 76 | 31 37 31 30 32 30 31 36 |OH.90Nov|17102016|
|00000140| 40 73 72 61 63 6f 32 2e | 75 73 2e 73 72 61 2e 63 |@sraco2.|us.sra.c|
|00000150| 6f 2e 6a 70 3e 0a 44 61 | 74 65 3a 20 31 37 20 4e |o.jp>.Da|te: 17 N|
|00000160| 6f 76 20 39 30 20 30 31 | 3a 32 30 3a 31 36 20 47 |ov 90 01|:20:16 G|
|00000170| 4d 54 0a 53 65 6e 64 65 | 72 3a 20 75 73 65 6e 65 |MT.Sende|r: usene|
|00000180| 74 40 73 72 61 63 6f 31 | 2e 75 73 2e 73 72 61 2e |t@sraco1|.us.sra.|
|00000190| 43 4f 2e 4a 50 0a 44 69 | 73 74 72 69 62 75 74 69 |CO.JP.Di|stributi|
|000001a0| 6f 6e 3a 20 63 6f 6d 70 | 0a 4f 72 67 61 6e 69 7a |on: comp|.Organiz|
|000001b0| 61 74 69 6f 6e 3a 20 53 | 6f 66 74 77 61 72 65 20 |ation: S|oftware |
|000001c0| 52 65 73 65 61 72 63 68 | 20 41 73 73 6f 63 69 61 |Research| Associa|
|000001d0| 74 65 73 2c 20 49 6e 63 | 2e 20 42 6f 75 6c 64 65 |tes, Inc|. Boulde|
|000001e0| 72 20 4c 61 62 2e 0a 4c | 69 6e 65 73 3a 20 34 39 |r Lab..L|ines: 49|
|000001f0| 38 0a 0a 0a 45 61 73 79 | 2d 73 65 72 76 20 6c 69 |8...Easy|-serv li|
|00000200| 62 72 61 72 79 20 69 73 | 20 61 20 63 6f 6c 6c 65 |brary is| a colle|
|00000210| 63 74 69 6f 6e 20 6f 66 | 20 75 74 69 6c 2e 20 72 |ction of| util. r|
|00000220| 6f 75 74 69 6e 65 73 20 | 77 68 69 63 68 20 73 75 |outines |which su|
|00000230| 70 70 6f 72 74 20 74 6f | 0a 62 75 69 6c 64 20 73 |pport to|.build s|
|00000240| 69 6d 70 6c 65 20 73 65 | 72 76 65 72 2f 6d 75 6c |imple se|rver/mul|
|00000250| 74 69 2d 63 6c 69 65 6e | 74 20 70 72 6f 67 72 61 |ti-clien|t progra|
|00000260| 6d 73 2e 0a 0a 65 6e 6a | 6f 79 2e 0a 0a 23 21 2f |ms...enj|oy...#!/|
|00000270| 62 69 6e 2f 73 68 0a 23 | 20 54 68 69 73 20 69 73 |bin/sh.#| This is|
|00000280| 20 61 20 73 68 65 6c 6c | 20 61 72 63 68 69 76 65 | a shell| archive|
|00000290| 2e 20 20 52 65 6d 6f 76 | 65 20 61 6e 79 74 68 69 |. Remov|e anythi|
|000002a0| 6e 67 20 62 65 66 6f 72 | 65 20 74 68 69 73 20 6c |ng befor|e this l|
|000002b0| 69 6e 65 2c 0a 23 20 74 | 68 65 6e 20 75 6e 70 61 |ine,.# t|hen unpa|
|000002c0| 63 6b 20 69 74 20 62 79 | 20 73 61 76 69 6e 67 20 |ck it by| saving |
|000002d0| 69 74 20 69 6e 20 61 20 | 66 69 6c 65 20 61 6e 64 |it in a |file and|
|000002e0| 20 74 79 70 69 6e 67 20 | 22 73 68 20 66 69 6c 65 | typing |"sh file|
|000002f0| 22 2e 0a 23 0a 23 20 57 | 72 61 70 70 65 64 20 62 |"..#.# W|rapped b|
|00000300| 79 20 73 61 6b 6f 68 40 | 73 72 61 2e 63 6f 2e 6a |y sakoh@|sra.co.j|
|00000310| 70 20 6f 6e 20 46 72 69 | 20 4e 6f 76 20 31 36 20 |p on Fri| Nov 16 |
|00000320| 31 38 3a 30 38 3a 32 39 | 20 4d 53 54 20 31 39 39 |18:08:29| MST 199|
|00000330| 30 0a 23 20 43 6f 6e 74 | 65 6e 74 73 3a 20 20 52 |0.# Cont|ents: R|
|00000340| 45 41 44 4d 45 2e 65 6e | 67 20 65 61 73 79 2d 73 |EADME.en|g easy-s|
|00000350| 65 72 76 2e 6d 61 6e 2e | 65 6e 67 20 65 61 73 79 |erv.man.|eng easy|
|00000360| 2d 73 65 72 76 2e 70 6c | 20 65 61 73 79 2d 69 70 |-serv.pl| easy-ip|
|00000370| 63 2e 70 6c 0a 20 0a 65 | 63 68 6f 20 78 20 2d 20 |c.pl. .e|cho x - |
|00000380| 52 45 41 44 4d 45 2e 65 | 6e 67 0a 73 65 64 20 27 |README.e|ng.sed '|
|00000390| 73 2f 5e 40 2f 2f 27 20 | 3e 20 22 52 45 41 44 4d |s/^@//' |> "READM|
|000003a0| 45 2e 65 6e 67 22 20 3c | 3c 27 40 2f 2f 45 2a 4f |E.eng" <|<'@//E*O|
|000003b0| 2a 46 20 52 45 41 44 4d | 45 2e 65 6e 67 2f 2f 27 |*F READM|E.eng//'|
|000003c0| 0a 0a 52 45 41 44 4d 45 | 20 66 6f 72 20 65 61 73 |..README| for eas|
|000003d0| 79 2d 73 65 72 76 2e 70 | 6c 09 09 09 3a 20 46 72 |y-serv.p|l...: Fr|
|000003e0| 69 20 4e 6f 76 20 20 39 | 20 31 34 3a 34 36 3a 35 |i Nov 9| 14:46:5|
|000003f0| 30 20 4d 53 54 20 31 39 | 39 30 0a 0a 31 2e 20 4d |0 MST 19|90..1. M|
|00000400| 4f 4b 55 54 45 4b 49 20 | 2d 20 28 50 75 72 70 6f |OKUTEKI |- (Purpo|
|00000410| 73 65 29 0a 0a 20 20 20 | 20 20 45 61 73 79 2d 73 |se).. | Easy-s|
|00000420| 65 72 76 20 69 73 20 61 | 20 73 65 74 20 6f 66 20 |erv is a| set of |
|00000430| 72 6f 75 74 69 6e 65 73 | 20 77 72 69 74 74 65 6e |routines| written|
|00000440| 20 69 6e 20 50 45 52 4c | 20 74 6f 20 73 75 70 70 | in PERL| to supp|
|00000450| 6f 72 74 20 63 6f 6e 73 | 74 72 75 63 74 69 6e 67 |ort cons|tructing|
|00000460| 0a 20 73 65 72 76 65 72 | 2f 63 6c 69 65 6e 74 20 |. server|/client |
|00000470| 70 72 6f 67 72 61 6d 73 | 2e 0a 20 41 6c 74 68 6f |programs|.. Altho|
|00000480| 75 67 68 20 69 74 20 68 | 61 73 20 61 20 6c 69 6d |ugh it h|as a lim|
|00000490| 69 74 65 64 20 66 65 61 | 74 75 72 65 73 20 6f 6e |ited fea|tures on|
|000004a0| 6c 79 2c 20 69 74 27 73 | 20 73 74 69 6c 6c 20 75 |ly, it's| still u|
|000004b0| 73 65 66 75 6c 0a 20 66 | 6f 72 20 65 78 70 65 72 |seful. f|or exper|
|000004c0| 69 6d 65 6e 74 61 6c 20 | 6f 72 20 73 69 6d 70 6c |imental |or simpl|
|000004d0| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 73 2e 0a |e applic|ations..|
|000004e0| 20 41 20 73 65 72 76 65 | 72 20 63 61 6e 20 73 65 | A serve|r can se|
|000004f0| 72 76 65 20 6d 75 6c 74 | 69 70 6c 65 20 63 6c 69 |rve mult|iple cli|
|00000500| 65 6e 74 73 20 61 74 20 | 74 68 65 20 73 61 6d 65 |ents at |the same|
|00000510| 20 74 69 6d 65 2e 0a 20 | 54 63 70 20 70 72 6f 74 | time.. |Tcp prot|
|00000520| 6f 63 6f 6c 20 69 73 20 | 75 73 65 64 20 66 6f 72 |ocol is |used for|
|00000530| 20 74 68 65 20 70 75 72 | 70 6f 73 65 2e 0a 20 53 | the pur|pose.. S|
|00000540| 6f 6d 65 6f 6e 65 20 6d | 69 67 68 74 20 66 69 6e |omeone m|ight fin|
|00000550| 64 20 73 6f 6d 65 20 63 | 6f 6e 63 65 70 75 74 75 |d some c|onceputu|
|00000560| 61 6c 20 73 69 6d 69 6c | 61 72 69 74 79 20 77 69 |al simil|arity wi|
|00000570| 74 68 0a 20 53 75 6e 27 | 73 20 52 50 43 20 28 52 |th. Sun'|s RPC (R|
|00000580| 65 6d 6f 74 65 20 50 72 | 6f 63 65 64 75 72 65 20 |emote Pr|ocedure |
|00000590| 43 61 6c 6c 29 2e 0a 20 | 48 6f 77 65 76 65 72 20 |Call).. |However |
|000005a0| 74 68 65 72 65 20 69 73 | 20 6e 6f 20 58 44 52 20 |there is| no XDR |
|000005b0| 28 65 58 74 65 72 6e 61 | 6c 20 44 61 74 61 20 52 |(eXterna|l Data R|
|000005c0| 65 70 72 65 73 65 6e 74 | 61 74 69 6f 6e 29 20 73 |epresent|ation) s|
|000005d0| 75 70 70 6f 72 74 73 20 | 28 73 6f 72 72 79 29 2e |upports |(sorry).|
|000005e0| 0a 0a 32 2e 20 52 49 59 | 4f 55 20 4a 4f 55 4b 45 |..2. RIY|OU JOUKE|
|000005f0| 4e 20 54 4f 55 20 2d 20 | 28 43 6f 70 79 72 69 67 |N TOU - |(Copyrig|
|00000600| 68 74 20 6e 6f 74 69 63 | 65 29 0a 0a 0a 20 43 6f |ht notic|e)... Co|
|00000610| 70 79 72 69 67 68 74 20 | 31 39 39 30 20 53 6f 66 |pyright |1990 Sof|
|00000620| 74 77 61 72 65 20 52 65 | 73 65 61 72 63 68 20 41 |tware Re|search A|
|00000630| 73 73 6f 63 69 61 74 65 | 73 2c 20 49 6e 63 2e 0a |ssociate|s, Inc..|
|00000640| 0a 20 50 65 72 6d 69 73 | 73 69 6f 6e 20 74 6f 20 |. Permis|sion to |
|00000650| 75 73 65 2c 20 63 6f 70 | 79 2c 20 6d 6f 64 69 66 |use, cop|y, modif|
|00000660| 79 2c 20 64 69 73 74 72 | 69 62 75 74 65 2c 20 61 |y, distr|ibute, a|
|00000670| 6e 64 20 73 65 6c 6c 20 | 74 68 69 73 20 73 6f 66 |nd sell |this sof|
|00000680| 74 77 61 72 65 20 61 6e | 64 20 69 74 73 0a 20 64 |tware an|d its. d|
|00000690| 6f 63 75 6d 65 6e 74 61 | 74 69 6f 6e 20 66 6f 72 |ocumenta|tion for|
|000006a0| 20 61 6e 79 20 70 75 72 | 70 6f 73 65 20 69 73 20 | any pur|pose is |
|000006b0| 68 65 72 65 62 79 20 67 | 72 61 6e 74 65 64 20 77 |hereby g|ranted w|
|000006c0| 69 74 68 6f 75 74 20 66 | 65 65 2c 20 70 72 6f 76 |ithout f|ee, prov|
|000006d0| 69 64 65 64 20 74 68 61 | 74 0a 20 74 68 65 20 61 |ided tha|t. the a|
|000006e0| 62 6f 76 65 20 63 6f 70 | 79 72 69 67 68 74 20 6e |bove cop|yright n|
|000006f0| 6f 74 69 63 65 20 61 70 | 70 65 61 72 20 69 6e 20 |otice ap|pear in |
|00000700| 61 6c 6c 20 63 6f 70 69 | 65 73 20 61 6e 64 20 74 |all copi|es and t|
|00000710| 68 61 74 20 62 6f 74 68 | 20 74 68 61 74 0a 20 63 |hat both| that. c|
|00000720| 6f 70 79 72 69 67 68 74 | 20 6e 6f 74 69 63 65 20 |opyright| notice |
|00000730| 61 6e 64 20 74 68 69 73 | 20 70 65 72 6d 69 73 73 |and this| permiss|
|00000740| 69 6f 6e 20 6e 6f 74 69 | 63 65 20 61 70 70 65 61 |ion noti|ce appea|
|00000750| 72 20 69 6e 20 73 75 70 | 70 6f 72 74 69 6e 67 0a |r in sup|porting.|
|00000760| 20 64 6f 63 75 6d 65 6e | 74 61 74 69 6f 6e 2c 20 | documen|tation, |
|00000770| 61 6e 64 20 74 68 61 74 | 20 74 68 65 20 6e 61 6d |and that| the nam|
|00000780| 65 20 6f 66 20 53 2e 52 | 2e 41 2e 20 6e 6f 74 20 |e of S.R|.A. not |
|00000790| 62 65 20 75 73 65 64 20 | 69 6e 20 61 64 76 65 72 |be used |in adver|
|000007a0| 74 69 73 69 6e 67 20 6f | 72 0a 20 70 75 62 6c 69 |tising o|r. publi|
|000007b0| 63 69 74 79 20 70 65 72 | 74 61 69 6e 69 6e 67 20 |city per|taining |
|000007c0| 74 6f 20 64 69 73 74 72 | 69 62 75 74 69 6f 6e 20 |to distr|ibution |
|000007d0| 6f 66 20 74 68 65 20 73 | 6f 66 74 77 61 72 65 20 |of the s|oftware |
|000007e0| 77 69 74 68 6f 75 74 20 | 73 70 65 63 69 66 69 63 |without |specific|
|000007f0| 2c 0a 20 77 72 69 74 74 | 65 6e 20 70 72 69 6f 72 |,. writt|en prior|
|00000800| 20 70 65 72 6d 69 73 73 | 69 6f 6e 2e 20 20 53 2e | permiss|ion. S.|
|00000810| 52 2e 41 2e 20 6d 61 6b | 65 73 20 6e 6f 20 72 65 |R.A. mak|es no re|
|00000820| 70 72 65 73 65 6e 74 61 | 74 69 6f 6e 73 20 61 62 |presenta|tions ab|
|00000830| 6f 75 74 20 74 68 65 0a | 20 73 75 69 74 61 62 69 |out the.| suitabi|
|00000840| 6c 69 74 79 20 6f 66 20 | 74 68 69 73 20 73 6f 66 |lity of |this sof|
|00000850| 74 77 61 72 65 20 66 6f | 72 20 61 6e 79 20 70 75 |tware fo|r any pu|
|00000860| 72 70 6f 73 65 2e 20 20 | 49 74 20 69 73 20 70 72 |rpose. |It is pr|
|00000870| 6f 76 69 64 65 64 20 22 | 61 73 20 69 73 22 0a 20 |ovided "|as is". |
|00000880| 77 69 74 68 6f 75 74 20 | 65 78 70 72 65 73 73 20 |without |express |
|00000890| 6f 72 20 69 6d 70 6c 69 | 65 64 20 77 61 72 72 61 |or impli|ed warra|
|000008a0| 6e 74 79 2e 0a 0a 20 53 | 2e 52 2e 41 2e 20 44 49 |nty... S|.R.A. DI|
|000008b0| 53 43 4c 41 49 4d 53 20 | 41 4c 4c 20 57 41 52 52 |SCLAIMS |ALL WARR|
|000008c0| 41 4e 54 49 45 53 20 57 | 49 54 48 20 52 45 47 41 |ANTIES W|ITH REGA|
|000008d0| 52 44 20 54 4f 20 54 48 | 49 53 20 53 4f 46 54 57 |RD TO TH|IS SOFTW|
|000008e0| 41 52 45 2c 20 49 4e 43 | 4c 55 44 49 4e 47 20 41 |ARE, INC|LUDING A|
|000008f0| 4c 4c 0a 20 49 4d 50 4c | 49 45 44 20 57 41 52 52 |LL. IMPL|IED WARR|
|00000900| 41 4e 54 49 45 53 20 4f | 46 20 4d 45 52 43 48 41 |ANTIES O|F MERCHA|
|00000910| 4e 54 41 42 49 4c 49 54 | 59 20 41 4e 44 20 46 49 |NTABILIT|Y AND FI|
|00000920| 54 4e 45 53 53 2c 20 49 | 4e 20 4e 4f 20 45 56 45 |TNESS, I|N NO EVE|
|00000930| 4e 54 20 53 48 41 4c 4c | 20 53 2e 52 2e 41 2e 0a |NT SHALL| S.R.A..|
|00000940| 20 42 45 20 4c 49 41 42 | 4c 45 20 46 4f 52 20 41 | BE LIAB|LE FOR A|
|00000950| 4e 59 20 53 50 45 43 49 | 41 4c 2c 20 49 4e 44 49 |NY SPECI|AL, INDI|
|00000960| 52 45 43 54 20 4f 52 20 | 43 4f 4e 53 45 51 55 45 |RECT OR |CONSEQUE|
|00000970| 4e 54 49 41 4c 20 44 41 | 4d 41 47 45 53 20 4f 52 |NTIAL DA|MAGES OR|
|00000980| 20 41 4e 59 20 44 41 4d | 41 47 45 53 0a 20 57 48 | ANY DAM|AGES. WH|
|00000990| 41 54 53 4f 45 56 45 52 | 20 52 45 53 55 4c 54 49 |ATSOEVER| RESULTI|
|000009a0| 4e 47 20 46 52 4f 4d 20 | 4c 4f 53 53 20 4f 46 20 |NG FROM |LOSS OF |
|000009b0| 55 53 45 2c 20 44 41 54 | 41 20 4f 52 20 50 52 4f |USE, DAT|A OR PRO|
|000009c0| 46 49 54 53 2c 20 57 48 | 45 54 48 45 52 20 49 4e |FITS, WH|ETHER IN|
|000009d0| 20 41 4e 20 41 43 54 49 | 4f 4e 0a 20 4f 46 20 43 | AN ACTI|ON. OF C|
|000009e0| 4f 4e 54 52 41 43 54 2c | 20 4e 45 47 4c 49 47 45 |ONTRACT,| NEGLIGE|
|000009f0| 4e 43 45 20 4f 52 20 4f | 54 48 45 52 20 54 4f 52 |NCE OR O|THER TOR|
|00000a00| 54 49 4f 55 53 20 41 43 | 54 49 4f 4e 2c 20 41 52 |TIOUS AC|TION, AR|
|00000a10| 49 53 49 4e 47 20 4f 55 | 54 20 4f 46 20 4f 52 20 |ISING OU|T OF OR |
|00000a20| 49 4e 20 0a 20 43 4f 4e | 4e 45 43 54 49 4f 4e 20 |IN . CON|NECTION |
|00000a30| 57 49 54 48 20 54 48 45 | 20 55 53 45 20 4f 52 20 |WITH THE| USE OR |
|00000a40| 50 45 52 46 4f 52 4d 41 | 4e 43 45 20 4f 46 20 54 |PERFORMA|NCE OF T|
|00000a50| 48 49 53 20 53 4f 46 54 | 57 41 52 45 2e 0a 0a 20 |HIS SOFT|WARE... |
|00000a60| 41 75 74 68 6f 72 3a 20 | 20 53 61 6b 6f 68 2c 20 |Author: | Sakoh, |
|00000a70| 48 69 72 6f 73 68 69 20 | 2d 20 53 6f 66 74 77 61 |Hiroshi |- Softwa|
|00000a80| 72 65 20 52 65 73 65 61 | 72 63 68 20 41 73 73 6f |re Resea|rch Asso|
|00000a90| 63 69 61 74 65 73 2c 20 | 49 6e 63 2e 0a 40 2f 2f |ciates, |Inc..@//|
|00000aa0| 45 2a 4f 2a 46 20 52 45 | 41 44 4d 45 2e 65 6e 67 |E*O*F RE|ADME.eng|
|00000ab0| 2f 2f 0a 63 68 6d 6f 64 | 20 75 3d 72 77 2c 67 3d |//.chmod| u=rw,g=|
|00000ac0| 72 77 2c 6f 3d 72 20 52 | 45 41 44 4d 45 2e 65 6e |rw,o=r R|EADME.en|
|00000ad0| 67 0a 20 0a 65 63 68 6f | 20 78 20 2d 20 65 61 73 |g. .echo| x - eas|
|00000ae0| 79 2d 73 65 72 76 2e 6d | 61 6e 2e 65 6e 67 0a 73 |y-serv.m|an.eng.s|
|00000af0| 65 64 20 27 73 2f 5e 40 | 2f 2f 27 20 3e 20 22 65 |ed 's/^@|//' > "e|
|00000b00| 61 73 79 2d 73 65 72 76 | 2e 6d 61 6e 2e 65 6e 67 |asy-serv|.man.eng|
|00000b10| 22 20 3c 3c 27 40 2f 2f | 45 2a 4f 2a 46 20 65 61 |" <<'@//|E*O*F ea|
|00000b20| 73 79 2d 73 65 72 76 2e | 6d 61 6e 2e 65 6e 67 2f |sy-serv.|man.eng/|
|00000b30| 2f 27 0a 40 2e 54 48 20 | 45 41 53 59 2d 53 45 52 |/'.@.TH |EASY-SER|
|00000b40| 56 20 6c 20 22 4e 6f 76 | 20 31 2c 20 31 39 39 30 |V l "Nov| 1, 1990|
|00000b50| 22 0a 40 2e 53 48 20 4e | 41 4d 45 0a 65 61 73 79 |".@.SH N|AME.easy|
|00000b60| 2d 73 65 72 76 20 5c 2d | 20 73 69 6d 70 6c 65 20 |-serv \-| simple |
|00000b70| 73 65 72 76 65 72 2f 6d | 75 6c 74 69 2d 63 6c 69 |server/m|ulti-cli|
|00000b80| 65 6e 74 20 70 72 6f 67 | 72 61 6d 20 6c 69 62 72 |ent prog|ram libr|
|00000b90| 61 72 79 20 69 6e 20 70 | 65 72 6c 2e 0a 40 2e 53 |ary in p|erl..@.S|
|00000ba0| 48 20 53 59 4e 4f 50 53 | 49 53 0a 40 2e 62 72 0a |H SYNOPS|IS.@.br.|
|00000bb0| 40 2e 42 20 72 65 71 75 | 69 72 65 20 22 22 22 65 |@.B requ|ire """e|
|00000bc0| 61 73 79 2d 73 65 72 76 | 2e 70 6c 22 22 0a 40 2e |asy-serv|.pl"".@.|
|00000bd0| 62 72 0a 40 2e 42 20 22 | 26 72 65 67 69 73 74 65 |br.@.B "|&registe|
|00000be0| 72 5f 73 65 72 76 28 73 | 6f 63 6b 65 74 2c 20 70 |r_serv(s|ocket, p|
|00000bf0| 6f 72 74 29 22 0a 40 2e | 62 72 0a 40 2e 42 20 22 |ort)".@.|br.@.B "|
|00000c00| 26 72 75 6e 5f 73 65 72 | 76 28 29 22 0a 40 2e 62 |&run_ser|v()".@.b|
|00000c10| 72 0a 40 2e 42 20 22 26 | 63 6c 65 61 6e 75 70 5f |r.@.B "&|cleanup_|
|00000c20| 73 65 72 76 28 29 22 0a | 40 2e 62 72 0a 40 2e 42 |serv()".|@.br.@.B|
|00000c30| 20 22 26 72 65 67 69 73 | 74 65 72 5f 63 6c 69 65 | "&regis|ter_clie|
|00000c40| 6e 74 28 73 6f 63 6b 65 | 74 2c 20 20 68 6f 73 74 |nt(socke|t, host|
|00000c50| 2c 20 70 6f 72 74 29 22 | 0a 40 2e 62 72 0a 40 2e |, port)"|.@.br.@.|
|00000c60| 42 20 22 26 73 65 6e 64 | 5f 72 65 71 75 65 73 74 |B "&send|_request|
|00000c70| 28 73 6f 63 6b 65 74 2c | 20 72 65 71 75 65 73 74 |(socket,| request|
|00000c80| 29 22 0a 40 2e 62 72 0a | 40 2e 53 48 20 44 45 53 |)".@.br.|@.SH DES|
|00000c90| 43 52 49 50 54 49 4f 4e | 0a 45 61 73 79 2d 73 65 |CRIPTION|.Easy-se|
|00000ca0| 72 76 20 69 73 20 61 20 | 73 65 74 20 6f 66 20 72 |rv is a |set of r|
|00000cb0| 6f 75 74 69 6e 65 73 20 | 74 6f 20 73 75 70 70 6f |outines |to suppo|
|00000cc0| 72 74 20 63 6f 6e 73 74 | 72 75 63 74 69 6e 67 0a |rt const|ructing.|
|00000cd0| 73 65 72 76 65 72 2f 63 | 6c 69 65 6e 74 20 70 72 |server/c|lient pr|
|00000ce0| 6f 67 72 61 6d 73 2e 0a | 41 6c 74 68 6f 75 67 68 |ograms..|Although|
|00000cf0| 20 69 74 20 68 61 73 20 | 61 20 6c 69 6d 69 74 65 | it has |a limite|
|00000d00| 64 20 66 65 61 74 75 72 | 65 73 20 6f 6e 6c 79 2c |d featur|es only,|
|00000d10| 20 69 74 27 73 20 73 74 | 69 6c 6c 20 75 73 65 66 | it's st|ill usef|
|00000d20| 75 6c 0a 66 6f 72 20 65 | 78 70 65 72 69 6d 65 6e |ul.for e|xperimen|
|00000d30| 74 61 6c 20 6f 72 20 73 | 69 6d 70 6c 65 20 61 70 |tal or s|imple ap|
|00000d40| 70 6c 69 63 61 74 69 6f | 6e 73 2e 0a 61 20 73 65 |plicatio|ns..a se|
|00000d50| 72 76 65 72 20 63 61 6e | 20 73 65 72 76 65 20 6d |rver can| serve m|
|00000d60| 75 6c 74 69 70 6c 65 20 | 63 6c 69 65 6e 74 73 20 |ultiple |clients |
|00000d70| 61 74 20 74 68 65 20 73 | 61 6d 65 20 74 69 6d 65 |at the s|ame time|
|00000d80| 2e 0a 54 63 70 20 70 72 | 6f 74 6f 63 6f 6c 20 69 |..Tcp pr|otocol i|
|00000d90| 73 20 75 73 65 64 20 66 | 6f 72 20 74 68 65 20 70 |s used f|or the p|
|00000da0| 75 72 70 6f 73 65 2e 0a | 53 6f 6d 65 6f 6e 65 20 |urpose..|Someone |
|00000db0| 6d 69 67 68 74 20 66 69 | 6e 64 20 73 6f 6d 65 20 |might fi|nd some |
|00000dc0| 63 6f 6e 63 65 70 75 74 | 75 61 6c 20 73 69 6d 69 |conceput|ual simi|
|00000dd0| 6c 61 72 69 74 79 20 77 | 69 74 68 20 53 75 6e 27 |larity w|ith Sun'|
|00000de0| 73 20 52 50 43 0a 28 52 | 65 6d 6f 74 65 20 50 72 |s RPC.(R|emote Pr|
|00000df0| 6f 63 65 64 75 72 65 20 | 43 61 6c 6c 29 2e 0a 48 |ocedure |Call)..H|
|00000e00| 6f 77 65 76 65 72 20 74 | 68 65 72 65 20 69 73 20 |owever t|here is |
|00000e10| 6e 6f 20 58 44 52 20 28 | 65 58 74 65 72 6e 61 6c |no XDR (|eXternal|
|00000e20| 20 44 61 74 61 20 52 65 | 70 72 65 73 65 6e 74 61 | Data Re|presenta|
|00000e30| 74 69 6f 6e 29 20 73 75 | 70 70 6f 72 74 73 20 28 |tion) su|pports (|
|00000e40| 73 6f 72 72 79 29 2e 0a | 40 2e 50 50 0a 52 6f 75 |sorry)..|@.PP.Rou|
|00000e50| 74 69 6e 65 73 20 26 72 | 65 67 69 73 74 65 72 5f |tines &r|egister_|
|00000e60| 73 65 72 76 28 29 2c 20 | 26 72 75 6e 5f 73 65 72 |serv(), |&run_ser|
|00000e70| 76 28 29 2c 20 26 63 6c | 65 61 6e 75 70 5f 73 65 |v(), &cl|eanup_se|
|00000e80| 72 76 28 29 20 61 72 65 | 0a 75 73 65 64 20 69 6e |rv() are|.used in|
|00000e90| 20 73 65 72 76 65 72 20 | 73 69 64 65 2e 0a 54 68 | server |side..Th|
|00000ea0| 65 20 72 65 73 74 20 26 | 72 65 67 69 73 74 65 72 |e rest &|register|
|00000eb0| 5f 63 6c 69 65 6e 74 28 | 29 2c 20 26 73 65 6e 64 |_client(|), &send|
|00000ec0| 5f 72 65 71 75 65 73 74 | 28 29 20 61 72 65 20 75 |_request|() are u|
|00000ed0| 73 65 64 20 69 6e 20 63 | 6c 69 65 6e 74 20 73 69 |sed in c|lient si|
|00000ee0| 64 65 2e 0a 40 2e 54 50 | 0a 40 2e 42 20 22 26 72 |de..@.TP|.@.B "&r|
|00000ef0| 65 67 69 73 74 65 72 5f | 73 65 72 76 28 53 4f 43 |egister_|serv(SOC|
|00000f00| 4b 45 54 2c 20 50 4f 52 | 54 29 22 0a 63 72 65 61 |KET, POR|T)".crea|
|00000f10| 74 65 73 20 61 20 69 6e | 74 65 72 6e 65 74 20 74 |tes a in|ternet t|
|00000f20| 63 70 2f 69 70 20 53 4f | 43 4b 45 54 20 61 6e 64 |cp/ip SO|CKET and|
|00000f30| 20 62 69 6e 64 20 69 74 | 20 74 6f 20 74 68 65 20 | bind it| to the |
|00000f40| 73 70 65 63 69 66 69 65 | 64 20 50 4f 52 54 2e 0a |specifie|d PORT..|
|00000f50| 54 68 69 73 20 53 4f 43 | 4b 45 54 20 77 69 6c 6c |This SOC|KET will|
|00000f60| 20 62 65 20 75 73 65 64 | 20 61 73 20 73 65 72 76 | be used| as serv|
|00000f70| 65 72 20 73 6f 63 6b 65 | 74 2e 0a 59 6f 75 20 63 |er socke|t..You c|
|00000f80| 61 6e 20 73 70 65 63 69 | 66 79 20 50 4f 52 54 20 |an speci|fy PORT |
|00000f90| 61 73 20 6e 75 6d 62 65 | 72 20 6f 72 20 61 20 73 |as numbe|r or a s|
|00000fa0| 79 6d 62 6f 6c 69 63 20 | 6e 61 6d 65 0a 66 6f 75 |ymbolic |name.fou|
|00000fb0| 6e 64 20 69 6e 20 2f 65 | 74 63 2f 73 65 72 76 69 |nd in /e|tc/servi|
|00000fc0| 63 65 2e 0a 40 2e 54 50 | 0a 40 2e 42 20 22 26 72 |ce..@.TP|.@.B "&r|
|00000fd0| 75 6e 5f 73 65 72 76 28 | 29 22 0a 70 72 6f 63 65 |un_serv(|)".proce|
|00000fe0| 73 73 65 73 20 61 6c 6c | 20 72 65 71 75 65 73 74 |sses all| request|
|00000ff0| 73 20 66 72 6f 6d 20 6d | 75 6c 74 69 70 6c 65 20 |s from m|ultiple |
|00001000| 63 6c 69 65 6e 74 73 2e | 0a 42 65 66 6f 72 65 20 |clients.|.Before |
|00001010| 63 61 6c 6c 69 6e 67 20 | 74 68 69 73 20 72 6f 75 |calling |this rou|
|00001020| 74 69 6e 65 2c 20 79 6f | 75 20 6d 75 73 74 20 63 |tine, yo|u must c|
|00001030| 61 6c 6c 0a 26 72 65 67 | 69 73 74 65 72 5f 73 65 |all.&reg|ister_se|
|00001040| 72 76 28 29 20 74 6f 20 | 68 61 76 65 20 61 20 73 |rv() to |have a s|
|00001050| 65 72 76 65 72 20 73 6f | 63 6b 65 74 2e 0a 55 73 |erver so|cket..Us|
|00001060| 65 72 73 20 6d 75 73 74 | 20 73 75 70 70 6c 79 20 |ers must| supply |
|00001070| 61 20 72 6f 75 74 69 6e | 65 20 6e 61 6d 65 64 0a |a routin|e named.|
|00001080| 40 2e 42 20 22 26 73 65 | 72 76 5f 62 6f 64 79 28 |@.B "&se|rv_body(|
|00001090| 52 45 51 55 45 53 54 2c | 20 53 4f 43 4b 45 54 29 |REQUEST,| SOCKET)|
|000010a0| 22 0a 77 68 69 63 68 20 | 64 6f 65 73 20 61 63 74 |".which |does act|
|000010b0| 75 61 6c 20 73 65 72 76 | 69 63 65 73 2e 0a 49 6e |ual serv|ices..In|
|000010c0| 20 52 45 51 55 45 53 54 | 20 61 72 67 75 6d 65 6e | REQUEST| argumen|
|000010d0| 74 2c 20 79 6f 75 20 77 | 69 6c 6c 20 66 69 6e 64 |t, you w|ill find|
|000010e0| 20 64 61 74 61 20 66 72 | 6f 6d 20 74 68 65 20 63 | data fr|om the c|
|000010f0| 75 72 72 65 6e 74 20 63 | 6c 69 65 6e 74 2e 0a 41 |urrent c|lient..A|
|00001100| 6e 64 20 69 6e 20 53 4f | 43 4b 45 54 20 61 72 67 |nd in SO|CKET arg|
|00001110| 75 6d 65 6e 74 2c 20 79 | 6f 75 20 68 61 76 65 20 |ument, y|ou have |
|00001120| 74 68 65 20 63 75 72 72 | 65 6e 74 20 63 6c 69 65 |the curr|ent clie|
|00001130| 6e 74 27 73 20 73 6f 63 | 6b 65 74 20 6e 61 6d 65 |nt's soc|ket name|
|00001140| 2e 0a 45 61 63 68 20 63 | 6c 69 65 6e 74 27 73 20 |..Each c|lient's |
|00001150| 73 6f 63 6b 65 74 20 6e | 61 6d 65 20 69 73 20 6d |socket n|ame is m|
|00001160| 61 64 65 20 74 6f 20 62 | 65 20 75 6e 69 71 75 65 |ade to b|e unique|
|00001170| 20 77 69 74 68 69 6e 20 | 61 20 73 65 72 76 65 72 | within |a server|
|00001180| 20 73 6f 20 74 68 61 74 | 0a 79 6f 75 20 63 61 6e | so that|.you can|
|00001190| 20 64 69 73 74 69 6e 67 | 75 69 73 68 20 63 6c 69 | disting|uish cli|
|000011a0| 65 6e 74 73 20 77 69 74 | 68 69 6e 20 26 73 65 72 |ents wit|hin &ser|
|000011b0| 76 5f 62 6f 64 79 28 29 | 20 72 6f 75 74 69 6e 65 |v_body()| routine|
|000011c0| 2e 0a 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 69 |..For ex|ample, i|
|000011d0| 66 20 79 6f 75 20 6d 61 | 6b 65 20 61 20 73 65 72 |f you ma|ke a ser|
|000011e0| 76 65 72 20 73 6f 63 6b | 65 74 20 62 79 20 20 26 |ver sock|et by &|
|000011f0| 72 65 67 69 73 74 65 72 | 5f 73 65 72 76 28 53 45 |register|_serv(SE|
|00001200| 52 56 45 52 2c 20 37 39 | 39 39 39 29 2c 0a 63 6f |RVER, 79|999),.co|
|00001210| 6e 73 65 71 75 65 6e 74 | 6c 79 20 65 61 63 68 20 |nsequent|ly each |
|00001220| 63 6c 69 65 6e 74 27 73 | 20 73 6f 63 6b 65 74 20 |client's| socket |
|00001230| 68 61 73 20 61 20 6e 61 | 6d 65 20 6c 69 6b 65 20 |has a na|me like |
|00001240| 22 53 45 52 56 45 52 2e | 2e 61 22 2c 20 22 53 45 |"SERVER.|.a", "SE|
|00001250| 52 56 45 52 2e 2e 62 22 | 20 2e 2e 0a 61 6e 64 20 |RVER..b"| ...and |
|00001260| 73 6f 20 6f 6e 2e 0a 54 | 68 65 20 72 65 74 75 72 |so on..T|he retur|
|00001270| 6e 20 76 61 6c 75 65 20 | 6f 66 0a 26 73 65 72 76 |n value |of.&serv|
|00001280| 5f 62 6f 64 79 28 29 0a | 69 73 20 73 65 6e 74 20 |_body().|is sent |
|00001290| 62 61 63 6b 20 74 6f 20 | 74 68 65 20 63 75 72 72 |back to |the curr|
|000012a0| 65 6e 74 20 63 6c 69 65 | 6e 74 20 61 73 20 69 74 |ent clie|nt as it|
|000012b0| 20 69 73 2e 0a 53 65 65 | 20 74 68 65 20 65 78 61 | is..See| the exa|
|000012c0| 6d 70 6c 65 20 64 65 73 | 63 72 69 62 65 64 20 62 |mple des|cribed b|
|000012d0| 65 6c 6f 77 2e 0a 40 2e | 54 50 0a 40 2e 42 20 22 |elow..@.|TP.@.B "|
|000012e0| 26 63 6c 65 61 6e 75 70 | 5f 73 65 72 76 28 29 22 |&cleanup|_serv()"|
|000012f0| 0a 63 6c 6f 73 65 73 20 | 61 6c 6c 20 73 6f 63 6b |.closes |all sock|
|00001300| 65 74 73 20 61 6e 64 20 | 65 78 69 74 73 2e 0a 54 |ets and |exits..T|
|00001310| 68 69 73 20 69 73 20 75 | 73 65 64 20 69 6e 20 26 |his is u|sed in &|
|00001320| 73 65 72 76 5f 62 6f 6f | 64 79 28 29 20 72 6f 75 |serv_boo|dy() rou|
|00001330| 74 69 6e 65 2e 0a 40 2e | 50 50 0a 54 68 65 20 66 |tine..@.|PP.The f|
|00001340| 6f 6c 6c 6f 77 69 6e 67 | 20 72 6f 75 74 69 6e 65 |ollowing| routine|
|00001350| 73 20 61 72 65 20 75 73 | 65 64 20 69 6e 20 63 6c |s are us|ed in cl|
|00001360| 69 65 6e 74 73 2e 0a 40 | 2e 54 50 0a 40 2e 42 20 |ients..@|.TP.@.B |
|00001370| 22 26 72 65 67 69 73 74 | 65 72 5f 63 6c 69 65 6e |"&regist|er_clien|
|00001380| 74 28 53 4f 43 4b 45 54 | 2c 20 48 4f 53 54 2c 20 |t(SOCKET|, HOST, |
|00001390| 50 4f 52 54 29 22 0a 6d | 61 6b 65 73 20 61 20 63 |PORT)".m|akes a c|
|000013a0| 6c 69 65 6e 74 20 73 69 | 64 65 20 53 4f 43 4b 45 |lient si|de SOCKE|
|000013b0| 54 20 63 6f 6e 6e 65 63 | 74 69 6e 67 20 74 6f 20 |T connec|ting to |
|000013c0| 74 68 65 20 73 70 65 63 | 69 66 69 63 20 50 4f 52 |the spec|ific POR|
|000013d0| 54 0a 6f 6e 20 74 68 65 | 20 73 70 65 63 69 66 69 |T.on the| specifi|
|000013e0| 63 20 48 4f 53 54 2e 0a | 46 6f 72 20 48 4f 53 54 |c HOST..|For HOST|
|000013f0| 2c 20 79 6f 75 20 63 61 | 6e 20 73 75 70 70 6c 79 |, you ca|n supply|
|00001400| 20 61 20 6e 61 6d 65 20 | 66 6f 75 6e 64 20 69 6e | a name |found in|
|00001410| 20 2f 65 74 63 2f 68 6f | 73 74 73 20 6f 72 0a 61 | /etc/ho|sts or.a|
|00001420| 20 69 6e 74 65 72 6e 65 | 74 20 61 64 64 72 65 73 | interne|t addres|
|00001430| 73 20 66 6f 72 6d 61 74 | 20 6c 69 6b 65 20 31 31 |s format| like 11|
|00001440| 2e 32 32 2e 33 33 2e 34 | 34 2e 0a 50 4f 52 54 27 |.22.33.4|4..PORT'|
|00001450| 73 20 66 6f 72 6d 61 74 | 20 69 73 20 73 61 6d 65 |s format| is same|
|00001460| 20 61 73 20 26 72 65 67 | 69 73 74 65 72 5f 73 65 | as &reg|ister_se|
|00001470| 72 76 28 29 2e 0a 40 2e | 54 50 0a 40 2e 42 20 22 |rv()..@.|TP.@.B "|
|00001480| 26 73 65 6e 64 5f 72 65 | 71 75 65 73 74 28 53 4f |&send_re|quest(SO|
|00001490| 43 4b 45 54 2c 20 52 45 | 51 55 45 53 54 29 22 0a |CKET, RE|QUEST)".|
|000014a0| 73 65 6e 64 73 20 61 6e | 20 52 45 51 55 45 53 54 |sends an| REQUEST|
|000014b0| 20 74 6f 20 74 68 65 20 | 63 6f 72 72 65 73 70 6f | to the |correspo|
|000014c0| 6e 64 69 6e 67 20 73 65 | 72 76 65 72 20 76 69 61 |nding se|rver via|
|000014d0| 20 53 4f 43 4b 45 54 20 | 77 68 69 63 68 0a 69 73 | SOCKET |which.is|
|000014e0| 20 63 72 65 61 74 65 64 | 20 62 79 20 26 72 65 67 | created| by &reg|
|000014f0| 69 73 74 65 72 5f 63 6c | 69 65 6e 74 28 29 20 63 |ister_cl|ient() c|
|00001500| 61 6c 6c 2e 0a 49 74 20 | 77 61 69 74 73 20 61 20 |all..It |waits a |
|00001510| 72 65 70 6c 79 20 66 72 | 6f 6d 20 73 65 72 76 65 |reply fr|om serve|
|00001520| 72 20 61 6e 64 20 72 65 | 74 75 72 6e 73 20 69 74 |r and re|turns it|
|00001530| 2e 0a 40 2e 50 50 0a 45 | 61 73 79 2d 73 65 72 76 |..@.PP.E|asy-serv|
|00001540| 20 6c 69 62 72 61 72 79 | 20 72 6f 75 74 69 6e 65 | library| routine|
|00001550| 73 20 72 65 6c 79 20 6f | 6e 20 74 68 65 20 72 6f |s rely o|n the ro|
|00001560| 75 74 69 6e 65 73 20 64 | 65 66 69 6e 65 64 20 69 |utines d|efined i|
|00001570| 6e 0a 65 61 73 79 2d 69 | 70 63 2e 70 6c 2e 0a 59 |n.easy-i|pc.pl..Y|
|00001580| 6f 75 20 6d 69 67 68 74 | 20 62 65 20 61 62 6c 65 |ou might| be able|
|00001590| 20 74 6f 20 62 75 69 6c | 64 0a 6d 6f 72 65 20 73 | to buil|d.more s|
|000015a0| 6f 70 68 69 73 74 69 63 | 61 74 65 64 20 61 70 70 |ophistic|ated app|
|000015b0| 6c 69 63 61 74 69 6f 6e | 73 20 62 79 20 75 73 69 |lication|s by usi|
|000015c0| 6e 67 20 74 68 65 6d 20 | 64 69 72 65 63 74 6c 79 |ng them |directly|
|000015d0| 2e 0a 40 2e 53 48 20 45 | 58 41 4d 50 4c 45 0a 40 |..@.SH E|XAMPLE.@|
|000015e0| 2e 73 70 0a 41 20 73 65 | 72 76 65 72 0a 40 2e 73 |.sp.A se|rver.@.s|
|000015f0| 70 0a 40 2e 6e 66 0a 40 | 2e 66 74 20 4c 50 0a 23 |p.@.nf.@|.ft LP.#|
|00001600| 21 2f 75 73 72 2f 6c 6f | 63 61 6c 2f 62 69 6e 2f |!/usr/lo|cal/bin/|
|00001610| 70 65 72 6c 0a 0a 72 65 | 71 75 69 72 65 20 22 65 |perl..re|quire "e|
|00001620| 61 73 79 2d 73 65 72 76 | 2e 70 6c 22 3b 09 23 20 |asy-serv|.pl";.# |
|00001630| 6c 6f 61 64 69 6e 67 20 | 74 68 65 20 6c 69 62 72 |loading |the libr|
|00001640| 61 72 79 0a 0a 26 72 65 | 67 69 73 74 65 72 5f 73 |ary..&re|gister_s|
|00001650| 65 72 76 28 53 45 52 56 | 45 52 2c 20 37 39 39 39 |erv(SERV|ER, 7999|
|00001660| 29 3b 09 23 20 6d 61 6b | 65 20 61 20 73 65 72 76 |);.# mak|e a serv|
|00001670| 65 72 20 73 6f 63 6b 65 | 74 20 6f 6e 20 70 6f 72 |er socke|t on por|
|00001680| 74 20 37 39 39 39 0a 0a | 26 72 75 6e 5f 73 65 72 |t 7999..|&run_ser|
|00001690| 76 28 29 3b 09 23 20 64 | 69 73 70 61 74 63 68 69 |v();.# d|ispatchi|
|000016a0| 6e 67 20 28 6e 65 76 65 | 72 20 72 65 74 75 72 6e |ng (neve|r return|
|000016b0| 73 29 0a 0a 73 75 62 20 | 73 65 72 76 5f 62 6f 64 |s)..sub |serv_bod|
|000016c0| 79 20 7b 09 23 20 55 73 | 65 72 73 20 6d 75 73 74 |y {.# Us|ers must|
|000016d0| 20 73 75 70 70 6c 79 20 | 74 68 69 73 20 72 6f 75 | supply |this rou|
|000016e0| 74 69 6e 65 2e 0a 09 09 | 23 20 24 5f 5b 30 5d 20 |tine....|# $_[0] |
|000016f0| 3a 20 72 65 71 75 65 73 | 74 20 64 61 74 61 20 73 |: reques|t data s|
|00001700| 65 6e 74 20 66 72 6f 6d | 20 61 20 63 6c 69 65 6e |ent from| a clien|
|00001710| 74 0a 09 09 23 20 24 5f | 5b 31 5d 20 3a 20 73 6f |t...# $_|[1] : so|
|00001720| 63 6b 65 74 20 6e 61 6d | 65 20 63 6f 72 72 65 73 |cket nam|e corres|
|00001730| 70 6f 6e 64 69 6e 67 20 | 74 6f 20 74 68 65 20 63 |ponding |to the c|
|00001740| 75 72 72 65 6e 74 20 63 | 6c 69 65 6e 74 0a 0a 20 |urrent c|lient.. |
|00001750| 20 20 20 70 72 69 6e 74 | 20 22 63 6c 69 65 6e 74 | print| "client|
|00001760| 20 73 6f 63 6b 20 6e 61 | 6d 65 3d 22 20 2e 20 24 | sock na|me=" . $|
|00001770| 5f 5b 31 5d 20 2e 20 22 | 5c 6e 22 3b 0a 0a 20 20 |_[1] . "|\n";.. |
|00001780| 20 20 69 66 20 28 24 5f | 5b 30 5d 20 65 71 20 22 | if ($_|[0] eq "|
|00001790| 77 68 6f 22 29 20 7b 0a | 09 24 72 65 70 6c 79 20 |who") {.|.$reply |
|000017a0| 3d 20 60 77 68 6f 60 3b | 0a 20 20 20 20 7d 20 65 |= `who`;|. } e|
|000017b0| 6c 73 69 66 20 28 24 5f | 5b 30 5d 20 65 71 20 22 |lsif ($_|[0] eq "|
|000017c0| 70 73 22 29 20 7b 0a 09 | 24 72 65 70 6c 79 20 3d |ps") {..|$reply =|
|000017d0| 20 60 70 73 60 3b 0a 20 | 20 20 20 7d 20 65 6c 73 | `ps`;. | } els|
|000017e0| 69 66 20 28 24 5f 5b 30 | 5d 20 65 71 20 22 6b 69 |if ($_[0|] eq "ki|
|000017f0| 6c 6c 22 29 20 7b 0a 09 | 26 63 6c 65 61 6e 75 70 |ll") {..|&cleanup|
|00001800| 5f 73 65 72 76 28 29 3b | 0a 20 20 20 20 7d 20 65 |_serv();|. } e|
|00001810| 6c 73 65 20 7b 0a 09 24 | 72 65 70 6c 79 20 3d 20 |lse {..$|reply = |
|00001820| 20 22 77 68 6f 20 20 3a | 20 77 68 6f 20 69 73 20 | "who :| who is |
|00001830| 6f 6e 20 74 68 69 73 20 | 68 6f 73 74 5c 5c 6e 22 |on this |host\\n"|
|00001840| 20 0a 09 09 2e 20 22 70 | 73 20 20 20 3a 20 73 68 | .... "p|s : sh|
|00001850| 6f 77 20 70 72 6f 63 65 | 73 73 5c 5c 6e 22 20 0a |ow proce|ss\\n" .|
|00001860| 09 09 2e 20 22 6b 69 6c | 6c 20 3a 20 6b 69 6c 6c |... "kil|l : kill|
|00001870| 20 73 65 72 76 65 72 5c | 5c 6e 22 20 0a 09 09 2e | server\|\n" ....|
|00001880| 20 22 68 65 6c 70 20 3a | 20 73 68 6f 77 20 74 68 | "help :| show th|
|00001890| 69 73 20 6d 65 73 73 61 | 67 65 5c 5c 6e 22 3b 0a |is messa|ge\\n";.|
|000018a0| 20 20 20 20 7d 0a 20 20 | 20 20 24 72 65 70 6c 79 | }. | $reply|
|000018b0| 3b 09 23 20 54 68 69 73 | 20 76 61 6c 75 65 20 69 |;.# This| value i|
|000018c0| 73 20 73 65 6e 74 20 62 | 61 63 6b 20 74 6f 20 74 |s sent b|ack to t|
|000018d0| 68 65 20 63 75 72 72 65 | 6e 74 20 63 6c 69 65 6e |he curre|nt clien|
|000018e0| 74 0a 7d 0a 0a 40 2e 66 | 74 20 50 0a 40 2e 66 69 |t.}..@.f|t P.@.fi|
|000018f0| 0a 40 2e 73 70 0a 41 20 | 63 6c 69 65 6e 74 0a 40 |.@.sp.A |client.@|
|00001900| 2e 73 70 0a 40 2e 6e 66 | 0a 40 2e 66 74 20 4c 50 |.sp.@.nf|.@.ft LP|
|00001910| 0a 23 21 2f 75 73 72 2f | 6c 6f 63 61 6c 2f 62 69 |.#!/usr/|local/bi|
|00001920| 6e 2f 70 65 72 6c 0a 0a | 72 65 71 75 69 72 65 20 |n/perl..|require |
|00001930| 22 65 61 73 79 2d 73 65 | 72 76 2e 70 6c 22 3b 09 |"easy-se|rv.pl";.|
|00001940| 23 20 6c 6f 61 64 69 6e | 67 20 74 68 65 20 6c 69 |# loadin|g the li|
|00001950| 62 72 61 72 79 0a 0a 26 | 72 65 67 69 73 74 65 72 |brary..&|register|
|00001960| 5f 63 6c 69 65 6e 74 28 | 43 4c 49 45 4e 54 2c 20 |_client(|CLIENT, |
|00001970| 22 6d 79 68 6f 73 74 22 | 2c 20 37 39 39 39 29 3b |"myhost"|, 7999);|
|00001980| 0a 09 09 09 23 20 63 6f | 6e 6e 65 63 74 69 6e 67 |....# co|nnecting|
|00001990| 20 74 6f 20 70 6f 72 74 | 20 37 39 39 39 20 6f 6e | to port| 7999 on|
|000019a0| 20 22 6d 79 68 6f 73 74 | 22 0a 0a 24 7c 20 3d 20 | "myhost|"..$| = |
|000019b0| 31 3b 0a 70 72 69 6e 74 | 20 22 2d 3e 20 22 3b 0a |1;.print| "-> ";.|
|000019c0| 77 68 69 6c 65 28 70 72 | 69 6e 74 20 22 2d 3e 20 |while(pr|int "-> |
|000019d0| 22 2c 20 3c 53 54 44 49 | 4e 3e 29 20 7b 0a 20 20 |", <STDI|N>) {. |
|000019e0| 20 20 63 68 6f 70 3b 0a | 20 20 20 20 24 72 65 70 | chop;.| $rep|
|000019f0| 6c 79 20 3d 20 26 73 65 | 6e 64 5f 72 65 71 75 65 |ly = &se|nd_reque|
|00001a00| 73 74 28 43 4c 49 45 4e | 54 2c 20 24 5f 29 3b 20 |st(CLIEN|T, $_); |
|00001a10| 23 20 73 65 6e 64 20 61 | 20 72 65 71 75 65 73 74 |# send a| request|
|00001a20| 0a 20 20 20 20 70 72 69 | 6e 74 20 24 72 65 70 6c |. pri|nt $repl|
|00001a30| 79 3b 09 09 09 23 20 70 | 72 69 6e 74 20 74 68 65 |y;...# p|rint the|
|00001a40| 20 72 65 70 6c 79 0a 7d | 0a 40 2e 66 74 20 50 0a | reply.}|.@.ft P.|
|00001a50| 40 2e 66 69 0a 40 2e 53 | 48 20 46 49 4c 45 53 0a |@.fi.@.S|H FILES.|
|00001a60| 2f 75 73 72 2f 6c 6f 63 | 61 6c 2f 6c 69 62 2f 70 |/usr/loc|al/lib/p|
|00001a70| 65 72 6c 2f 65 61 73 79 | 2d 73 65 72 76 2e 70 6c |erl/easy|-serv.pl|
|00001a80| 20 3a 20 65 61 73 79 2d | 73 65 72 76 20 6c 69 62 | : easy-|serv lib|
|00001a90| 72 61 72 79 0a 40 2e 62 | 72 0a 2f 75 73 72 2f 6c |rary.@.b|r./usr/l|
|00001aa0| 6f 63 61 6c 2f 6c 69 62 | 2f 70 65 72 6c 2f 65 61 |ocal/lib|/perl/ea|
|00001ab0| 73 79 2d 69 70 63 2e 70 | 6c 20 3a 20 6c 6f 77 20 |sy-ipc.p|l : low |
|00001ac0| 6c 65 76 65 6c 20 75 74 | 69 6c 2e 20 6c 69 62 72 |level ut|il. libr|
|00001ad0| 61 72 79 0a 40 2e 62 72 | 0a 2f 75 73 72 2f 6c 6f |ary.@.br|./usr/lo|
|00001ae0| 63 61 6c 2f 6c 69 62 2f | 70 65 72 6c 2f 73 79 73 |cal/lib/|perl/sys|
|00001af0| 2f 73 6f 63 6b 65 74 2e | 70 68 20 28 6e 6f 74 20 |/socket.|ph (not |
|00001b00| 69 6e 63 6c 75 64 65 64 | 29 0a 40 2e 62 72 0a 2f |included|).@.br./|
|00001b10| 75 73 72 2f 6c 6f 63 61 | 6c 2f 6c 69 62 2f 70 65 |usr/loca|l/lib/pe|
|00001b20| 72 6c 2f 73 79 73 2f 66 | 63 6e 74 6c 2e 70 68 20 |rl/sys/f|cntl.ph |
|00001b30| 20 28 6e 6f 74 20 69 6e | 63 6c 75 64 65 64 29 0a | (not in|cluded).|
|00001b40| 40 2e 53 48 20 22 49 4d | 50 4f 52 54 41 4e 54 20 |@.SH "IM|PORTANT |
|00001b50| 4e 4f 54 45 22 0a 40 2e | 53 48 20 42 55 47 53 0a |NOTE".@.|SH BUGS.|
|00001b60| 50 61 63 6b 61 67 65 20 | 69 73 6e 27 74 20 75 73 |Package |isn't us|
|00001b70| 65 64 20 28 79 65 74 29 | 2e 0a 40 2e 62 72 0a 54 |ed (yet)|..@.br.T|
|00001b80| 65 73 74 65 64 20 6f 6e | 6c 79 20 6f 6e 20 70 65 |ested on|ly on pe|
|00001b90| 72 6c 20 76 33 2e 30 20 | 70 61 74 63 68 6c 65 76 |rl v3.0 |patchlev|
|00001ba0| 65 6c 20 3e 20 33 37 2e | 0a 40 2e 53 48 20 41 55 |el > 37.|.@.SH AU|
|00001bb0| 54 48 4f 52 0a 53 61 6b | 6f 68 2c 20 48 69 72 6f |THOR.Sak|oh, Hiro|
|00001bc0| 73 68 69 3a 20 53 6f 66 | 74 77 61 72 65 20 52 65 |shi: Sof|tware Re|
|00001bd0| 73 65 61 72 63 68 20 41 | 73 73 6f 63 69 61 74 65 |search A|ssociate|
|00001be0| 73 2c 20 49 6e 63 2e 0a | 40 2e 62 72 0a 73 61 6b |s, Inc..|@.br.sak|
|00001bf0| 6f 68 40 73 72 61 2e 63 | 6f 2e 6a 70 20 6f 72 20 |oh@sra.c|o.jp or |
|00001c00| 75 75 6e 65 74 21 73 72 | 61 2e 63 6f 2e 6a 70 21 |uunet!sr|a.co.jp!|
|00001c10| 73 61 6b 6f 68 0a 40 2f | 2f 45 2a 4f 2a 46 20 65 |sakoh.@/|/E*O*F e|
|00001c20| 61 73 79 2d 73 65 72 76 | 2e 6d 61 6e 2e 65 6e 67 |asy-serv|.man.eng|
|00001c30| 2f 2f 0a 63 68 6d 6f 64 | 20 75 3d 72 77 2c 67 3d |//.chmod| u=rw,g=|
|00001c40| 72 77 2c 6f 3d 72 20 65 | 61 73 79 2d 73 65 72 76 |rw,o=r e|asy-serv|
|00001c50| 2e 6d 61 6e 2e 65 6e 67 | 0a 20 0a 65 63 68 6f 20 |.man.eng|. .echo |
|00001c60| 78 20 2d 20 65 61 73 79 | 2d 73 65 72 76 2e 70 6c |x - easy|-serv.pl|
|00001c70| 0a 73 65 64 20 27 73 2f | 5e 40 2f 2f 27 20 3e 20 |.sed 's/|^@//' > |
|00001c80| 22 65 61 73 79 2d 73 65 | 72 76 2e 70 6c 22 20 3c |"easy-se|rv.pl" <|
|00001c90| 3c 27 40 2f 2f 45 2a 4f | 2a 46 20 65 61 73 79 2d |<'@//E*O|*F easy-|
|00001ca0| 73 65 72 76 2e 70 6c 2f | 2f 27 0a 23 23 23 23 23 |serv.pl/|/'.#####|
|00001cb0| 23 0a 23 0a 23 20 20 20 | 45 41 53 59 2d 53 45 52 |#.#.# |EASY-SER|
|00001cc0| 56 2e 50 4c 0a 23 20 20 | 20 20 20 20 20 43 6f 70 |V.PL.# | Cop|
|00001cd0| 79 72 69 67 68 74 20 3a | 20 53 6f 66 74 77 61 72 |yright :| Softwar|
|00001ce0| 65 20 52 65 73 65 61 72 | 63 68 20 41 73 73 6f 63 |e Resear|ch Assoc|
|00001cf0| 69 61 74 65 73 2c 20 49 | 6e 63 2e 20 31 39 39 30 |iates, I|nc. 1990|
|00001d00| 0a 23 09 57 72 69 74 74 | 65 6e 20 62 79 20 48 69 |.#.Writt|en by Hi|
|00001d10| 72 6f 73 68 69 20 53 61 | 6b 6f 68 20 28 73 61 6b |roshi Sa|koh (sak|
|00001d20| 6f 68 40 73 72 61 2e 63 | 6f 2e 6a 70 29 20 6f 6e |oh@sra.c|o.jp) on|
|00001d30| 20 31 31 2d 30 31 2d 39 | 30 0a 23 09 50 6c 65 61 | 11-01-9|0.#.Plea|
|00001d40| 73 65 20 64 69 73 74 72 | 69 62 75 74 65 20 77 69 |se distr|ibute wi|
|00001d50| 64 65 6c 79 2c 20 62 75 | 74 20 6c 65 61 76 65 20 |dely, bu|t leave |
|00001d60| 6d 79 20 6e 61 6d 65 20 | 68 65 72 65 2e 0a 23 0a |my name |here..#.|
|00001d70| 0a 72 65 71 75 69 72 65 | 20 22 73 79 73 2f 66 63 |.require| "sys/fc|
|00001d80| 6e 74 6c 2e 70 68 22 3b | 0a 72 65 71 75 69 72 65 |ntl.ph";|.require|
|00001d90| 20 22 65 61 73 79 2d 69 | 70 63 2e 70 6c 22 3b 0a | "easy-i|pc.pl";.|
|00001da0| 23 0a 23 20 26 72 65 67 | 69 73 74 65 72 5f 73 65 |#.# &reg|ister_se|
|00001db0| 72 76 28 24 6e 61 6d 65 | 2c 20 24 70 6f 72 74 29 |rv($name|, $port)|
|00001dc0| 0a 23 0a 23 20 52 65 67 | 69 73 74 65 72 73 20 61 |.#.# Reg|isters a|
|00001dd0| 20 73 65 72 76 69 63 65 | 20 70 6f 72 74 2e 0a 23 | service| port..#|
|00001de0| 0a 73 75 62 20 72 65 67 | 69 73 74 65 72 5f 73 65 |.sub reg|ister_se|
|00001df0| 72 76 20 7b 0a 20 20 20 | 20 26 64 65 66 73 65 72 |rv {. | &defser|
|00001e00| 76 65 72 28 24 5f 5b 30 | 5d 2c 20 24 5f 5b 31 5d |ver($_[0|], $_[1]|
|00001e10| 29 3b 0a 20 20 20 20 66 | 63 6e 74 6c 28 24 5f 5b |);. f|cntl($_[|
|00001e20| 30 5d 2c 20 26 46 5f 53 | 45 54 46 4c 2c 20 26 46 |0], &F_S|ETFL, &F|
|00001e30| 4e 44 45 4c 41 59 29 20 | 20 20 20 20 20 20 20 20 |NDELAY) | |
|00001e40| 7c 7c 20 64 69 65 20 22 | 66 63 6e 74 6c 3a 20 24 ||| die "|fcntl: $|
|00001e50| 21 5c 6e 22 3b 0a 20 20 | 20 20 24 5f 65 73 65 72 |!\n";. | $_eser|
|00001e60| 76 5f 67 65 6e 65 72 69 | 63 7b 24 5f 5b 30 5d 7d |v_generi|c{$_[0]}|
|00001e70| 20 3d 20 24 5f 5b 30 5d | 3b 20 23 20 64 65 66 69 | = $_[0]|; # defi|
|00001e80| 6e 65 20 67 65 6e 65 72 | 69 63 20 73 6f 63 6b 65 |ne gener|ic socke|
|00001e90| 74 0a 20 20 20 20 24 5f | 65 73 65 72 76 5f 73 6f |t. $_|eserv_so|
|00001ea0| 63 6b 65 74 73 7b 24 5f | 5b 30 5d 7d 20 3d 20 24 |ckets{$_|[0]} = $|
|00001eb0| 5f 5b 30 5d 3b 0a 7d 0a | 23 0a 23 20 26 72 65 67 |_[0];.}.|#.# &reg|
|00001ec0| 69 73 74 65 72 5f 63 6c | 69 65 6e 74 28 24 6e 61 |ister_cl|ient($na|
|00001ed0| 6d 65 2c 20 24 68 6f 73 | 74 2c 20 24 70 6f 72 74 |me, $hos|t, $port|
|00001ee0| 29 0a 23 0a 23 20 52 65 | 67 69 73 74 65 72 73 20 |).#.# Re|gisters |
|00001ef0| 61 20 63 6c 69 65 6e 74 | 20 70 6f 72 74 2e 0a 23 |a client| port..#|
|00001f00| 0a 73 75 62 20 72 65 67 | 69 73 74 65 72 5f 63 6c |.sub reg|ister_cl|
|00001f10| 69 65 6e 74 20 7b 0a 20 | 20 20 20 26 64 65 66 63 |ient {. | &defc|
|00001f20| 6c 69 65 6e 74 28 24 5f | 5b 30 5d 2c 20 24 5f 5b |lient($_|[0], $_[|
|00001f30| 31 5d 2c 20 24 5f 5b 32 | 5d 29 3b 0a 20 20 20 20 |1], $_[2|]);. |
|00001f40| 66 63 6e 74 6c 28 24 5f | 5b 30 5d 2c 20 26 46 5f |fcntl($_|[0], &F_|
|00001f50| 53 45 54 46 4c 2c 20 26 | 46 4e 44 45 4c 41 59 29 |SETFL, &|FNDELAY)|
|00001f60| 20 20 20 20 20 20 20 20 | 20 7c 7c 20 64 69 65 20 | | || die |
|00001f70| 22 66 63 6e 74 6c 3a 20 | 24 21 5c 6e 22 3b 0a 20 |"fcntl: |$!\n";. |
|00001f80| 20 20 20 24 5f 65 63 6c | 69 65 6e 74 5f 73 6f 63 | $_ecl|ient_soc|
|00001f90| 6b 65 74 73 7b 24 5f 5b | 30 5d 7d 20 3d 20 24 5f |kets{$_[|0]} = $_|
|00001fa0| 5b 30 5d 3b 0a 7d 0a 0a | 23 0a 23 20 26 72 75 6e |[0];.}..|#.# &run|
|00001fb0| 5f 73 65 72 76 28 29 0a | 23 0a 23 20 57 61 69 74 |_serv().|#.# Wait|
|00001fc0| 20 66 6f 72 20 61 20 72 | 65 71 75 65 73 74 2c 20 | for a r|equest, |
|00001fd0| 64 69 73 70 61 74 63 68 | 20 69 74 2e 0a 23 20 53 |dispatch| it..# S|
|00001fe0| 65 6e 64 73 20 62 61 63 | 6b 20 61 20 72 65 70 6c |ends bac|k a repl|
|00001ff0| 79 20 74 6f 20 74 68 65 | 20 72 65 71 75 65 73 74 |y to the| request|
|00002000| 65 72 2e 0a 23 0a 73 75 | 62 20 72 75 6e 5f 73 65 |er..#.su|b run_se|
|00002010| 72 76 20 7b 0a 0a 20 20 | 20 20 6c 6f 63 61 6c 28 |rv {.. | local(|
|00002020| 24 62 79 74 65 73 74 6f | 72 65 61 64 2c 20 24 70 |$bytesto|read, $p|
|00002030| 61 63 6b 65 74 2c 20 24 | 61 63 74 75 61 6c 72 65 |acket, $|actualre|
|00002040| 61 64 2c 20 24 72 65 71 | 75 65 73 74 2c 20 24 72 |ad, $req|uest, $r|
|00002050| 65 70 6c 79 29 3b 0a 20 | 20 20 20 6c 6f 63 61 6c |eply);. | local|
|00002060| 28 24 62 79 74 65 73 74 | 6f 77 72 69 74 65 2c 20 |($bytest|owrite, |
|00002070| 24 61 63 74 75 61 6c 77 | 72 69 74 65 29 3b 0a 20 |$actualw|rite);. |
|00002080| 20 20 20 6c 6f 63 61 6c | 28 24 74 72 79 29 3b 0a | local|($try);.|
|00002090| 20 20 20 20 6c 6f 63 61 | 6c 28 24 4d 41 58 54 52 | loca|l($MAXTR|
|000020a0| 59 29 20 3d 20 31 30 30 | 30 3b 0a 0a 20 20 20 20 |Y) = 100|0;.. |
|000020b0| 66 6f 72 20 28 3b 3b 29 | 20 7b 0a 0a 09 40 61 76 |for (;;)| {...@av|
|000020c0| 61 69 6c 73 20 3d 20 26 | 73 65 6c 65 63 74 73 6f |ails = &|selectso|
|000020d0| 63 6b 28 6b 65 79 73 28 | 5f 65 73 65 72 76 5f 73 |ck(keys(|_eserv_s|
|000020e0| 6f 63 6b 65 74 73 29 29 | 3b 20 23 20 77 61 69 74 |ockets))|; # wait|
|000020f0| 20 66 6f 72 20 61 20 72 | 65 71 75 65 73 74 0a 0a | for a r|equest..|
|00002100| 09 6e 65 78 74 61 76 61 | 69 6c 3a 20 66 6f 72 28 |.nextava|il: for(|
|00002110| 40 61 76 61 69 6c 73 29 | 20 7b 0a 09 20 20 20 20 |@avails)| {.. |
|00002120| 69 66 20 28 64 65 66 69 | 6e 65 64 28 24 5f 65 73 |if (defi|ned($_es|
|00002130| 65 72 76 5f 67 65 6e 65 | 72 69 63 7b 24 5f 7d 29 |erv_gene|ric{$_})|
|00002140| 29 20 7b 20 23 20 67 6f | 74 20 61 20 72 65 71 75 |) { # go|t a requ|
|00002150| 65 73 74 20 66 6f 72 20 | 63 6f 6e 6e 65 63 74 69 |est for |connecti|
|00002160| 6f 6e 0a 09 09 26 61 63 | 63 65 70 74 73 6f 63 6b |on...&ac|ceptsock|
|00002170| 28 24 5f 65 73 65 72 76 | 5f 6e 65 77 73 6f 63 6b |($_eserv|_newsock|
|00002180| 2c 20 24 5f 29 3b 0a 09 | 09 24 5f 65 73 65 72 76 |, $_);..|.$_eserv|
|00002190| 5f 73 6f 63 6b 65 74 73 | 7b 24 5f 65 73 65 72 76 |_sockets|{$_eserv|
|000021a0| 5f 6e 65 77 73 6f 63 6b | 7d 20 3d 20 24 5f 65 73 |_newsock|} = $_es|
|000021b0| 65 72 76 5f 6e 65 77 73 | 6f 63 6b 3b 0a 09 20 20 |erv_news|ock;.. |
|000021c0| 20 20 7d 20 65 6c 73 65 | 20 7b 0a 09 09 69 66 20 | } else| {...if |
|000021d0| 28 21 65 6f 66 28 24 5f | 29 29 20 7b 20 23 20 67 |(!eof($_|)) { # g|
|000021e0| 6f 74 20 61 6e 20 75 73 | 75 61 6c 20 72 65 71 75 |ot an us|ual requ|
|000021f0| 65 73 74 0a 09 09 20 20 | 20 20 63 68 6f 70 28 24 |est... | chop($|
|00002200| 62 79 74 65 73 74 6f 72 | 65 61 64 20 3d 20 3c 24 |bytestor|ead = <$|
|00002210| 5f 3e 29 3b 0a 09 09 09 | 23 20 54 68 65 20 66 69 |_>);....|# The fi|
|00002220| 72 73 74 20 70 61 63 6b | 65 74 20 73 68 6f 75 6c |rst pack|et shoul|
|00002230| 64 20 63 6f 6e 74 61 69 | 6e 20 62 79 74 65 73 20 |d contai|n bytes |
|00002240| 74 6f 20 62 65 20 72 65 | 61 64 2e 0a 09 09 20 20 |to be re|ad.... |
|00002250| 20 20 66 6f 72 20 28 20 | 24 72 65 71 75 65 73 74 | for ( |$request|
|00002260| 20 3d 20 22 22 20 3b 20 | 24 62 79 74 65 73 74 6f | = "" ; |$bytesto|
|00002270| 72 65 61 64 20 3e 20 30 | 20 3b 0a 09 09 09 09 24 |read > 0| ;.....$|
|00002280| 62 79 74 65 73 74 6f 72 | 65 61 64 20 2d 3d 20 24 |bytestor|ead -= $|
|00002290| 61 63 74 75 61 6c 72 65 | 61 64 29 20 7b 0a 09 09 |actualre|ad) {...|
|000022a0| 09 66 6f 72 20 28 24 61 | 63 74 75 61 6c 72 65 61 |.for ($a|ctualrea|
|000022b0| 64 20 3d 20 24 74 72 79 | 20 3d 20 30 3b 0a 09 09 |d = $try| = 0;...|
|000022c0| 09 20 20 20 20 20 28 24 | 61 63 74 75 61 6c 72 65 |. ($|actualre|
|000022d0| 61 64 20 3d 3d 20 30 29 | 20 26 26 20 28 24 74 72 |ad == 0)| && ($tr|
|000022e0| 79 20 3c 20 24 4d 41 58 | 54 52 59 29 3b 20 24 74 |y < $MAX|TRY); $t|
|000022f0| 72 79 2b 2b 29 20 7b 0a | 09 09 09 20 20 20 20 24 |ry++) {.|... $|
|00002300| 61 63 74 75 61 6c 72 65 | 61 64 20 3d 20 72 65 61 |actualre|ad = rea|
|00002310| 64 28 24 5f 2c 20 24 70 | 61 63 6b 65 74 2c 20 24 |d($_, $p|acket, $|
|00002320| 62 79 74 65 73 74 6f 72 | 65 61 64 29 3b 0a 09 09 |bytestor|ead);...|
|00002330| 09 7d 0a 09 09 09 69 66 | 20 28 24 61 63 74 75 61 |.}....if| ($actua|
|00002340| 6c 72 65 61 64 20 3d 3d | 20 30 29 20 7b 0a 09 09 |lread ==| 0) {...|
|00002350| 09 20 20 20 20 70 72 69 | 6e 74 20 53 54 44 45 52 |. pri|nt STDER|
|00002360| 52 20 22 55 6e 65 78 70 | 65 63 74 65 64 20 45 4f |R "Unexp|ected EO|
|00002370| 46 5c 6e 22 3b 0a 09 09 | 09 20 20 20 20 63 6c 6f |F\n";...|. clo|
|00002380| 73 65 28 24 5f 29 3b 0a | 09 09 09 20 20 20 20 64 |se($_);.|... d|
|00002390| 65 6c 65 74 65 20 24 5f | 65 73 65 72 76 5f 73 6f |elete $_|eserv_so|
|000023a0| 63 6b 65 74 73 7b 24 5f | 7d 3b 0a 09 09 09 20 20 |ckets{$_|};.... |
|000023b0| 20 20 6e 65 78 74 20 6e | 65 78 74 61 76 61 69 6c | next n|extavail|
|000023c0| 3b 0a 09 09 09 7d 0a 09 | 09 09 24 72 65 71 75 65 |;....}..|..$reque|
|000023d0| 73 74 20 2e 3d 20 24 70 | 61 63 6b 65 74 3b 0a 09 |st .= $p|acket;..|
|000023e0| 09 20 20 20 20 7d 0a 09 | 09 20 20 20 20 24 72 65 |. }..|. $re|
|000023f0| 70 6c 79 20 3d 20 26 73 | 65 72 76 5f 62 6f 64 79 |ply = &s|erv_body|
|00002400| 28 24 72 65 71 75 65 73 | 74 2c 20 24 5f 29 3b 0a |($reques|t, $_);.|
|00002410| 09 09 20 20 20 20 23 20 | 49 27 64 20 72 65 61 6c |.. # |I'd real|
|00002420| 6c 79 20 6c 69 6b 65 20 | 74 6f 20 75 73 65 20 73 |ly like |to use s|
|00002430| 79 73 77 72 69 74 65 28 | 29 20 62 65 6c 6f 77 20 |yswrite(|) below |
|00002440| 74 6f 0a 09 09 20 20 20 | 20 23 20 61 76 6f 69 64 |to... | # avoid|
|00002450| 20 74 6f 20 62 65 20 62 | 6c 6f 63 6b 65 64 2e 20 | to be b|locked. |
|00002460| 42 75 74 20 69 74 20 64 | 6f 65 73 6e 27 74 20 77 |But it d|oesn't w|
|00002470| 6f 72 6b 2e 20 57 68 79 | 3f 3f 3f 3f 3f 3f 0a 09 |ork. Why|??????..|
|00002480| 09 20 20 20 20 70 72 69 | 6e 74 20 24 5f 20 6c 65 |. pri|nt $_ le|
|00002490| 6e 67 74 68 28 24 72 65 | 70 6c 79 29 20 2e 20 22 |ngth($re|ply) . "|
|000024a0| 5c 6e 22 3b 0a 09 09 20 | 20 20 20 66 6f 72 20 28 |\n";... | for (|
|000024b0| 24 62 79 74 65 73 74 6f | 77 72 69 74 65 20 3d 20 |$bytesto|write = |
|000024c0| 6c 65 6e 67 74 68 28 24 | 72 65 70 6c 79 29 0a 09 |length($|reply)..|
|000024d0| 09 09 3b 20 24 62 79 74 | 65 73 74 6f 77 72 69 74 |..; $byt|estowrit|
|000024e0| 65 20 3e 20 30 20 3b 20 | 24 62 79 74 65 73 74 6f |e > 0 ; |$bytesto|
|000024f0| 77 72 69 74 65 20 2d 3d | 20 31 30 32 34 29 20 7b |write -=| 1024) {|
|00002500| 0a 09 09 09 70 72 69 6e | 74 20 24 5f 20 20 73 75 |....prin|t $_ su|
|00002510| 62 73 74 72 28 24 72 65 | 70 6c 79 2c 20 30 2c 20 |bstr($re|ply, 0, |
|00002520| 31 30 32 34 29 3b 0a 09 | 09 09 24 72 65 70 6c 79 |1024);..|..$reply|
|00002530| 20 3d 20 73 75 62 73 74 | 72 28 24 72 65 70 6c 79 | = subst|r($reply|
|00002540| 2c 20 31 30 32 34 29 3b | 0a 09 09 20 20 20 20 7d |, 1024);|... }|
|00002550| 0a 09 09 7d 20 65 6c 73 | 65 20 7b 09 23 20 67 6f |...} els|e {.# go|
|00002560| 74 20 61 6e 20 65 6f 66 | 20 6d 65 73 73 61 67 65 |t an eof| message|
|00002570| 0a 09 09 20 20 20 20 63 | 6c 6f 73 65 28 24 5f 29 |... c|lose($_)|
|00002580| 3b 0a 09 09 20 20 20 20 | 64 65 6c 65 74 65 20 24 |;... |delete $|
|00002590| 5f 65 73 65 72 76 5f 73 | 6f 63 6b 65 74 73 7b 24 |_eserv_s|ockets{$|
|000025a0| 5f 7d 3b 0a 09 09 7d 0a | 09 20 20 20 20 7d 0a 09 |_};...}.|. }..|
|000025b0| 7d 0a 20 20 20 20 7d 0a | 7d 0a 0a 23 0a 23 20 26 |}. }.|}..#.# &|
|000025c0| 73 65 6e 64 5f 72 65 71 | 75 65 73 74 28 24 73 6f |send_req|uest($so|
|000025d0| 63 6b 65 74 2c 20 24 72 | 65 71 75 65 73 74 29 0a |cket, $r|equest).|
|000025e0| 23 0a 23 20 53 65 6e 64 | 73 20 61 20 72 65 71 75 |#.# Send|s a requ|
|000025f0| 65 73 74 20 74 6f 20 61 | 20 73 65 72 76 65 72 2c |est to a| server,|
|00002600| 20 77 61 69 74 73 20 61 | 20 72 65 70 6c 79 20 66 | waits a| reply f|
|00002610| 72 6f 6d 20 74 68 65 20 | 73 65 72 76 65 72 0a 23 |rom the |server.#|
|00002620| 20 61 6e 64 20 72 65 74 | 75 72 6e 73 20 69 74 2e | and ret|urns it.|
|00002630| 0a 23 0a 73 75 62 20 73 | 65 6e 64 5f 72 65 71 75 |.#.sub s|end_requ|
|00002640| 65 73 74 20 7b 0a 20 20 | 20 20 6c 6f 63 61 6c 28 |est {. | local(|
|00002650| 24 73 6f 63 6b 2c 20 24 | 72 65 71 75 65 73 74 29 |$sock, $|request)|
|00002660| 20 3d 20 40 5f 3b 0a 20 | 20 20 20 6c 6f 63 61 6c | = @_;. | local|
|00002670| 28 24 72 65 70 6c 79 2c | 20 24 70 61 63 6b 65 74 |($reply,| $packet|
|00002680| 2c 20 24 62 79 74 65 73 | 74 6f 72 65 61 64 2c 20 |, $bytes|toread, |
|00002690| 24 61 63 74 75 61 6c 72 | 65 61 64 29 3b 0a 20 20 |$actualr|ead);. |
|000026a0| 20 20 6c 6f 63 61 6c 28 | 24 62 79 74 65 73 74 6f | local(|$bytesto|
|000026b0| 77 72 69 74 65 29 3b 0a | 20 20 20 20 6c 6f 63 61 |write);.| loca|
|000026c0| 6c 28 24 74 72 79 29 3b | 0a 20 20 20 20 6c 6f 63 |l($try);|. loc|
|000026d0| 61 6c 28 24 4d 41 58 54 | 52 59 29 20 3d 20 31 30 |al($MAXT|RY) = 10|
|000026e0| 30 30 3b 0a 0a 20 20 20 | 20 23 20 49 27 64 20 72 |00;.. | # I'd r|
|000026f0| 65 61 6c 6c 79 20 6c 69 | 6b 65 20 74 6f 20 75 73 |eally li|ke to us|
|00002700| 65 20 73 79 73 77 72 69 | 74 65 28 29 20 62 65 6c |e syswri|te() bel|
|00002710| 6f 77 20 74 6f 0a 20 20 | 20 20 23 20 61 76 6f 69 |ow to. | # avoi|
|00002720| 64 20 74 6f 20 62 65 20 | 62 6c 6f 63 6b 65 64 2e |d to be |blocked.|
|00002730| 20 42 75 74 20 69 74 20 | 64 6f 65 73 6e 27 74 20 | But it |doesn't |
|00002740| 77 6f 72 6b 2e 20 57 68 | 79 3f 3f 3f 3f 3f 3f 0a |work. Wh|y??????.|
|00002750| 20 20 20 20 70 72 69 6e | 74 20 24 5f 20 6c 65 6e | prin|t $_ len|
|00002760| 67 74 68 28 24 72 65 71 | 75 65 73 74 29 20 2e 20 |gth($req|uest) . |
|00002770| 22 5c 6e 22 3b 09 09 23 | 20 77 72 69 74 65 20 6c |"\n";..#| write l|
|00002780| 65 6e 67 74 68 20 6f 66 | 20 64 61 74 61 0a 20 20 |ength of| data. |
|00002790| 20 20 66 6f 72 20 28 24 | 62 79 74 65 73 74 6f 77 | for ($|bytestow|
|000027a0| 72 69 74 65 20 3d 20 6c | 65 6e 67 74 68 28 24 72 |rite = l|ength($r|
|000027b0| 65 71 75 65 73 74 29 09 | 23 20 77 72 69 74 65 20 |equest).|# write |
|000027c0| 64 61 74 61 20 70 61 63 | 6b 65 74 73 0a 09 3b 20 |data pac|kets..; |
|000027d0| 24 62 79 74 65 73 74 6f | 77 72 69 74 65 20 3e 20 |$bytesto|write > |
|000027e0| 30 20 3b 20 24 62 79 74 | 65 73 74 6f 77 72 69 74 |0 ; $byt|estowrit|
|000027f0| 65 20 2d 3d 20 31 30 32 | 34 29 20 7b 0a 09 70 72 |e -= 102|4) {..pr|
|00002800| 69 6e 74 20 24 73 6f 63 | 6b 20 73 75 62 73 74 72 |int $soc|k substr|
|00002810| 28 24 72 65 71 75 65 73 | 74 2c 20 30 2c 20 31 30 |($reques|t, 0, 10|
|00002820| 32 34 29 3b 0a 09 24 72 | 65 70 6c 79 20 3d 20 73 |24);..$r|eply = s|
|00002830| 75 62 73 74 72 28 24 72 | 65 71 75 65 73 74 2c 20 |ubstr($r|equest, |
|00002840| 31 30 32 34 29 3b 0a 20 | 20 20 20 7d 0a 0a 20 20 |1024);. | }.. |
|00002850| 20 20 63 68 6f 70 28 24 | 62 79 74 65 73 74 6f 72 | chop($|bytestor|
|00002860| 65 61 64 20 3d 20 3c 24 | 73 6f 63 6b 3e 29 3b 0a |ead = <$|sock>);.|
|00002870| 09 23 20 54 68 65 20 66 | 69 72 73 74 20 70 61 63 |.# The f|irst pac|
|00002880| 6b 65 74 20 73 68 6f 75 | 6c 64 20 63 6f 6e 74 61 |ket shou|ld conta|
|00002890| 69 6e 20 62 79 74 65 73 | 20 74 6f 20 72 65 61 64 |in bytes| to read|
|000028a0| 2e 0a 20 20 20 20 66 6f | 72 20 28 20 24 72 65 70 |.. fo|r ( $rep|
|000028b0| 6c 79 20 3d 20 22 22 20 | 3b 20 24 62 79 74 65 73 |ly = "" |; $bytes|
|000028c0| 74 6f 72 65 61 64 20 3e | 20 30 20 3b 20 24 62 79 |toread >| 0 ; $by|
|000028d0| 74 65 73 74 6f 72 65 61 | 64 20 2d 3d 20 24 61 63 |testorea|d -= $ac|
|000028e0| 74 75 61 6c 72 65 61 64 | 29 20 7b 0a 09 66 6f 72 |tualread|) {..for|
|000028f0| 20 28 24 61 63 74 75 61 | 6c 72 65 61 64 20 3d 20 | ($actua|lread = |
|00002900| 24 74 72 79 20 3d 20 30 | 3b 0a 09 20 20 20 20 20 |$try = 0|;.. |
|00002910| 28 24 61 63 74 75 61 6c | 72 65 61 64 20 3d 3d 20 |($actual|read == |
|00002920| 30 29 20 26 26 20 28 24 | 74 72 79 20 3c 20 24 4d |0) && ($|try < $M|
|00002930| 41 58 54 52 59 29 3b 20 | 24 74 72 79 2b 2b 29 20 |AXTRY); |$try++) |
|00002940| 7b 0a 09 20 20 20 20 24 | 61 63 74 75 61 6c 72 65 |{.. $|actualre|
|00002950| 61 64 20 3d 20 72 65 61 | 64 28 24 5f 2c 20 24 70 |ad = rea|d($_, $p|
|00002960| 61 63 6b 65 74 2c 20 24 | 62 79 74 65 73 74 6f 72 |acket, $|bytestor|
|00002970| 65 61 64 29 3b 0a 09 7d | 0a 09 69 66 20 28 24 61 |ead);..}|..if ($a|
|00002980| 63 74 75 61 6c 72 65 61 | 64 20 3d 3d 20 30 29 20 |ctualrea|d == 0) |
|00002990| 7b 0a 09 20 20 20 20 70 | 72 69 6e 74 20 53 54 44 |{.. p|rint STD|
|000029a0| 45 52 52 20 22 55 6e 65 | 78 70 65 63 74 65 64 20 |ERR "Une|xpected |
|000029b0| 45 4f 46 5c 6e 22 3b 0a | 09 20 20 20 20 63 6c 6f |EOF\n";.|. clo|
|000029c0| 73 65 28 24 73 6f 63 6b | 29 3b 0a 09 20 20 20 20 |se($sock|);.. |
|000029d0| 72 65 74 75 72 6e 20 22 | 22 3b 0a 09 7d 0a 09 24 |return "|";..}..$|
|000029e0| 72 65 70 6c 79 20 2e 3d | 20 24 70 61 63 6b 65 74 |reply .=| $packet|
|000029f0| 3b 0a 20 20 20 20 7d 0a | 20 20 20 20 24 72 65 70 |;. }.| $rep|
|00002a00| 6c 79 3b 0a 7d 0a 0a 23 | 0a 23 20 26 63 6c 65 61 |ly;.}..#|.# &clea|
|00002a10| 6e 75 70 5f 73 65 72 76 | 28 29 0a 23 0a 23 20 43 |nup_serv|().#.# C|
|00002a20| 6c 6f 73 65 73 20 64 6f | 77 6e 20 61 6c 6c 20 73 |loses do|wn all s|
|00002a30| 65 72 76 65 72 20 73 6f | 63 6b 65 74 73 20 61 6e |erver so|ckets an|
|00002a40| 64 20 65 78 69 74 73 2e | 0a 23 0a 73 75 62 20 63 |d exits.|.#.sub c|
|00002a50| 6c 65 61 6e 75 70 5f 73 | 65 72 76 20 7b 0a 20 20 |leanup_s|erv {. |
|00002a60| 20 20 66 6f 72 28 6b 65 | 79 73 28 5f 65 73 65 72 | for(ke|ys(_eser|
|00002a70| 76 5f 73 6f 63 6b 65 74 | 73 29 29 20 7b 0a 09 63 |v_socket|s)) {..c|
|00002a80| 6c 6f 73 65 28 24 5f 29 | 3b 0a 20 20 20 20 7d 0a |lose($_)|;. }.|
|00002a90| 20 20 20 20 65 78 69 74 | 3b 0a 7d 0a 0a 31 3b 0a | exit|;.}..1;.|
|00002aa0| 40 2f 2f 45 2a 4f 2a 46 | 20 65 61 73 79 2d 73 65 |@//E*O*F| easy-se|
|00002ab0| 72 76 2e 70 6c 2f 2f 0a | 63 68 6d 6f 64 20 75 3d |rv.pl//.|chmod u=|
|00002ac0| 72 2c 67 3d 72 2c 6f 3d | 72 20 65 61 73 79 2d 73 |r,g=r,o=|r easy-s|
|00002ad0| 65 72 76 2e 70 6c 0a 20 | 0a 65 63 68 6f 20 78 20 |erv.pl. |.echo x |
|00002ae0| 2d 20 65 61 73 79 2d 69 | 70 63 2e 70 6c 0a 73 65 |- easy-i|pc.pl.se|
|00002af0| 64 20 27 73 2f 5e 40 2f | 2f 27 20 3e 20 22 65 61 |d 's/^@/|/' > "ea|
|00002b00| 73 79 2d 69 70 63 2e 70 | 6c 22 20 3c 3c 27 40 2f |sy-ipc.p|l" <<'@/|
|00002b10| 2f 45 2a 4f 2a 46 20 65 | 61 73 79 2d 69 70 63 2e |/E*O*F e|asy-ipc.|
|00002b20| 70 6c 2f 2f 27 0a 23 23 | 23 23 23 23 0a 23 0a 23 |pl//'.##|####.#.#|
|00002b30| 20 20 20 45 41 53 59 2d | 49 50 43 2e 50 4c 0a 23 | EASY-|IPC.PL.#|
|00002b40| 20 20 20 20 20 20 20 43 | 6f 70 79 72 69 67 68 74 | C|opyright|
|00002b50| 20 3a 20 53 6f 66 74 77 | 61 72 65 20 52 65 73 65 | : Softw|are Rese|
|00002b60| 61 72 63 68 20 41 73 73 | 6f 63 69 61 74 65 73 2c |arch Ass|ociates,|
|00002b70| 20 49 6e 63 2e 20 31 39 | 39 30 0a 23 09 57 72 69 | Inc. 19|90.#.Wri|
|00002b80| 74 74 65 6e 20 62 79 20 | 48 69 72 6f 73 68 69 20 |tten by |Hiroshi |
|00002b90| 53 61 6b 6f 68 20 28 73 | 61 6b 6f 68 40 73 72 61 |Sakoh (s|akoh@sra|
|00002ba0| 2e 63 6f 2e 6a 70 29 20 | 6f 6e 20 31 30 2d 32 35 |.co.jp) |on 10-25|
|00002bb0| 2d 39 30 0a 23 09 50 6c | 65 61 73 65 20 64 69 73 |-90.#.Pl|ease dis|
|00002bc0| 74 72 69 62 75 74 65 20 | 77 69 64 65 6c 79 2c 20 |tribute |widely, |
|00002bd0| 62 75 74 20 6c 65 61 76 | 65 20 6d 79 20 6e 61 6d |but leav|e my nam|
|00002be0| 65 20 68 65 72 65 2e 0a | 23 0a 0a 72 65 71 75 69 |e here..|#..requi|
|00002bf0| 72 65 20 22 73 79 73 2f | 73 6f 63 6b 65 74 2e 70 |re "sys/|socket.p|
|00002c00| 68 22 3b 0a 23 0a 23 20 | 26 64 65 66 73 65 72 76 |h";.#.# |&defserv|
|00002c10| 65 72 28 53 4f 43 4b 45 | 54 2c 20 24 70 6f 72 74 |er(SOCKE|T, $port|
|00002c20| 29 3b 0a 23 0a 23 20 52 | 65 74 75 72 6e 73 20 61 |);.#.# R|eturns a|
|00002c30| 20 73 65 72 76 65 72 20 | 73 6f 63 6b 65 74 20 72 | server |socket r|
|00002c40| 65 61 64 79 20 66 6f 72 | 20 61 63 63 65 70 74 73 |eady for| accepts|
|00002c50| 6f 63 6b 28 29 0a 23 0a | 73 75 62 20 64 65 66 73 |ock().#.|sub defs|
|00002c60| 65 72 76 65 72 20 7b 20 | 23 20 61 72 67 30 20 3d |erver { |# arg0 =|
|00002c70| 3d 20 73 6f 63 6b 65 74 | 2c 20 61 72 67 31 20 3d |= socket|, arg1 =|
|00002c80| 3d 20 70 6f 72 74 0a 20 | 20 20 20 6c 6f 63 61 6c |= port. | local|
|00002c90| 28 24 74 68 69 73 2c 20 | 24 6f 6c 64 66 68 29 3b |($this, |$oldfh);|
|00002ca0| 0a 20 20 20 20 6c 6f 63 | 61 6c 28 24 70 6f 72 74 |. loc|al($port|
|00002cb0| 29 20 3d 20 24 5f 5b 31 | 5d 3b 0a 20 20 20 20 6c |) = $_[1|];. l|
|00002cc0| 6f 63 61 6c 28 24 6e 61 | 6d 65 2c 20 24 61 6c 69 |ocal($na|me, $ali|
|00002cd0| 61 73 65 73 2c 20 24 70 | 72 6f 74 6f 29 3b 0a 20 |ases, $p|roto);. |
|00002ce0| 20 20 20 6c 6f 63 61 6c | 28 24 73 6f 63 6b 61 64 | local|($sockad|
|00002cf0| 64 72 5f 74 29 20 3d 20 | 27 53 20 6e 20 61 34 20 |dr_t) = |'S n a4 |
|00002d00| 78 38 27 3b 0a 0a 20 20 | 20 20 28 24 6e 61 6d 65 |x8';.. | ($name|
|00002d10| 2c 20 24 61 6c 69 61 73 | 65 73 2c 20 24 70 6f 72 |, $alias|es, $por|
|00002d20| 74 2c 20 24 70 72 6f 74 | 6f 29 20 3d 20 67 65 74 |t, $prot|o) = get|
|00002d30| 73 65 72 76 62 79 6e 61 | 6d 65 28 24 70 6f 72 74 |servbyna|me($port|
|00002d40| 2c 20 22 74 63 70 22 29 | 0a 09 09 09 09 09 75 6e |, "tcp")|......un|
|00002d50| 6c 65 73 73 20 24 70 6f | 72 74 20 3d 7e 20 2f 5e |less $po|rt =~ /^|
|00002d60| 5c 64 2b 24 2f 3b 0a 20 | 20 20 20 73 6f 63 6b 65 |\d+$/;. | socke|
|00002d70| 74 28 24 5f 5b 30 5d 2c | 20 26 50 46 5f 49 4e 45 |t($_[0],| &PF_INE|
|00002d80| 54 2c 20 26 53 4f 43 4b | 5f 53 54 52 45 41 4d 2c |T, &SOCK|_STREAM,|
|00002d90| 20 30 29 20 7c 7c 20 64 | 69 65 20 22 73 6f 63 6b | 0) || d|ie "sock|
|00002da0| 65 74 3a 20 24 21 5c 6e | 22 3b 0a 20 20 20 20 24 |et: $!\n|";. $|
|00002db0| 74 68 69 73 20 3d 20 70 | 61 63 6b 28 24 73 6f 63 |this = p|ack($soc|
|00002dc0| 6b 61 64 64 72 5f 74 2c | 20 26 50 46 5f 49 4e 45 |kaddr_t,| &PF_INE|
|00002dd0| 54 2c 20 24 70 6f 72 74 | 2c 20 22 5c 30 5c 30 5c |T, $port|, "\0\0\|
|00002de0| 30 5c 30 22 29 3b 0a 20 | 20 20 20 62 69 6e 64 28 |0\0");. | bind(|
|00002df0| 24 5f 5b 30 5d 2c 20 24 | 74 68 69 73 29 20 7c 7c |$_[0], $|this) |||
|00002e00| 20 64 69 65 20 22 62 69 | 6e 64 3a 20 24 21 5c 6e | die "bi|nd: $!\n|
|00002e10| 22 3b 0a 20 20 20 20 6c | 69 73 74 65 6e 28 24 5f |";. l|isten($_|
|00002e20| 5b 30 5d 2c 20 35 29 3b | 0a 20 20 20 20 24 6f 6c |[0], 5);|. $ol|
|00002e30| 64 66 68 20 3d 20 73 65 | 6c 65 63 74 28 24 5f 5b |dfh = se|lect($_[|
|00002e40| 30 5d 29 20 3b 20 24 7c | 20 3d 20 31 3b 20 73 65 |0]) ; $|| = 1; se|
|00002e50| 6c 65 63 74 28 24 6f 6c | 64 66 68 29 3b 0a 7d 0a |lect($ol|dfh);.}.|
|00002e60| 0a 23 0a 23 20 26 64 65 | 66 63 6c 69 65 6e 74 28 |.#.# &de|fclient(|
|00002e70| 53 4f 43 4b 45 54 2c 20 | 24 68 6f 73 74 2c 20 24 |SOCKET, |$host, $|
|00002e80| 70 6f 72 74 29 0a 23 0a | 23 20 52 65 74 75 72 6e |port).#.|# Return|
|00002e90| 73 20 61 20 63 6f 6e 6e | 65 63 74 65 64 20 63 6c |s a conn|ected cl|
|00002ea0| 69 65 6e 74 20 73 6f 63 | 6b 65 74 2e 0a 23 0a 73 |ient soc|ket..#.s|
|00002eb0| 75 62 20 64 65 66 63 6c | 69 65 6e 74 20 7b 20 23 |ub defcl|ient { #|
|00002ec0| 20 61 72 67 30 20 3d 3d | 20 73 6f 63 6b 65 74 2c | arg0 ==| socket,|
|00002ed0| 20 61 72 67 31 20 3d 3d | 20 68 6f 73 74 2c 20 61 | arg1 ==| host, a|
|00002ee0| 72 67 32 20 3d 3d 20 70 | 6f 72 74 0a 20 20 20 20 |rg2 == p|ort. |
|00002ef0| 6c 6f 63 61 6c 28 24 74 | 68 61 74 2c 20 24 74 68 |local($t|hat, $th|
|00002f00| 61 74 61 64 64 72 2c 20 | 24 6f 6c 64 66 68 29 3b |ataddr, |$oldfh);|
|00002f10| 0a 20 20 20 20 6c 6f 63 | 61 6c 28 24 70 6f 72 74 |. loc|al($port|
|00002f20| 29 20 3d 20 24 5f 5b 32 | 5d 3b 0a 20 20 20 20 6c |) = $_[2|];. l|
|00002f30| 6f 63 61 6c 28 24 6e 61 | 6d 65 2c 20 24 61 6c 69 |ocal($na|me, $ali|
|00002f40| 61 73 65 73 2c 20 24 70 | 72 6f 74 6f 29 3b 0a 20 |ases, $p|roto);. |
|00002f50| 20 20 20 6c 6f 63 61 6c | 28 24 73 6f 63 6b 61 64 | local|($sockad|
|00002f60| 64 72 5f 74 29 20 3d 20 | 27 53 20 6e 20 61 34 20 |dr_t) = |'S n a4 |
|00002f70| 78 38 27 3b 0a 0a 20 20 | 20 20 28 24 6e 61 6d 65 |x8';.. | ($name|
|00002f80| 2c 20 24 61 6c 69 61 73 | 65 73 2c 20 24 70 6f 72 |, $alias|es, $por|
|00002f90| 74 2c 20 24 70 72 6f 74 | 6f 29 20 3d 20 67 65 74 |t, $prot|o) = get|
|00002fa0| 73 65 72 76 62 79 6e 61 | 6d 65 28 24 70 6f 72 74 |servbyna|me($port|
|00002fb0| 2c 20 22 74 63 70 22 29 | 0a 09 09 09 09 09 75 6e |, "tcp")|......un|
|00002fc0| 6c 65 73 73 20 24 70 6f | 72 74 20 3d 7e 20 2f 5e |less $po|rt =~ /^|
|00002fd0| 5c 64 2b 24 2f 3b 0a 20 | 20 20 20 69 66 20 28 24 |\d+$/;. | if ($|
|00002fe0| 5f 5b 31 5d 20 3d 7e 20 | 2f 5e 5c 64 2b 5c 2e 5c |_[1] =~ |/^\d+\.\|
|00002ff0| 64 2b 5c 2e 5c 64 2b 5c | 2e 5c 64 2b 24 2f 29 20 |d+\.\d+\|.\d+$/) |
|00003000| 7b 0a 09 24 74 68 61 74 | 61 64 64 72 20 3d 20 26 |{..$that|addr = &|
|00003010| 69 6e 65 74 5f 61 64 64 | 72 28 24 5f 5b 31 5d 29 |inet_add|r($_[1])|
|00003020| 3b 0a 20 20 20 20 7d 20 | 65 6c 73 65 20 7b 0a 09 |;. } |else {..|
|00003030| 28 24 6e 61 6d 65 2c 20 | 24 61 6c 69 61 73 65 73 |($name, |$aliases|
|00003040| 2c 20 24 74 79 70 65 2c | 20 24 6c 65 6e 2c 20 24 |, $type,| $len, $|
|00003050| 74 68 61 74 61 64 64 72 | 29 20 3d 20 67 65 74 68 |thataddr|) = geth|
|00003060| 6f 73 74 62 79 6e 61 6d | 65 28 24 5f 5b 31 5d 29 |ostbynam|e($_[1])|
|00003070| 3b 0a 20 20 20 20 7d 0a | 20 20 20 20 24 74 68 61 |;. }.| $tha|
|00003080| 74 20 3d 20 70 61 63 6b | 28 24 73 6f 63 6b 61 64 |t = pack|($sockad|
|00003090| 64 72 5f 74 2c 20 26 50 | 46 5f 49 4e 45 54 2c 20 |dr_t, &P|F_INET, |
|000030a0| 24 70 6f 72 74 2c 20 24 | 74 68 61 74 61 64 64 72 |$port, $|thataddr|
|000030b0| 29 3b 0a 20 20 20 20 73 | 6f 63 6b 65 74 28 24 5f |);. s|ocket($_|
|000030c0| 5b 30 5d 2c 20 26 50 46 | 5f 49 4e 45 54 2c 20 26 |[0], &PF|_INET, &|
|000030d0| 53 4f 43 4b 5f 53 54 52 | 45 41 4d 2c 20 30 29 20 |SOCK_STR|EAM, 0) |
|000030e0| 7c 7c 20 64 69 65 20 22 | 73 6f 63 6b 65 74 3a 20 ||| die "|socket: |
|000030f0| 24 21 5c 6e 22 3b 0a 20 | 20 20 20 63 6f 6e 6e 65 |$!\n";. | conne|
|00003100| 63 74 28 24 5f 5b 30 5d | 2c 20 24 74 68 61 74 29 |ct($_[0]|, $that)|
|00003110| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003120| 20 20 20 20 7c 7c 20 64 | 69 65 20 22 63 6f 6e 6e | || d|ie "conn|
|00003130| 65 63 74 3a 20 24 21 5c | 6e 22 3b 0a 20 20 20 20 |ect: $!\|n";. |
|00003140| 24 6f 6c 64 66 68 20 3d | 20 73 65 6c 65 63 74 28 |$oldfh =| select(|
|00003150| 24 5f 5b 30 5d 29 20 3b | 20 24 7c 20 3d 20 31 3b |$_[0]) ;| $| = 1;|
|00003160| 20 73 65 6c 65 63 74 28 | 24 6f 6c 64 66 68 29 3b | select(|$oldfh);|
|00003170| 0a 7d 0a 0a 24 5f 5f 45 | 49 50 43 53 6e 6f 5f 5f |.}..$__E|IPCSno__|
|00003180| 20 3d 20 27 61 27 3b 0a | 23 0a 23 20 26 61 63 63 | = 'a';.|#.# &acc|
|00003190| 65 70 74 73 6f 63 6b 28 | 24 6e 65 77 73 6f 63 6b |eptsock(|$newsock|
|000031a0| 2c 20 24 73 65 72 76 65 | 72 73 6f 63 6b 29 0a 23 |, $serve|rsock).#|
|000031b0| 0a 23 20 52 65 74 75 72 | 6e 73 20 61 20 62 69 6e |.# Retur|ns a bin|
|000031c0| 64 20 73 6f 63 6b 65 74 | 20 77 68 69 63 68 20 69 |d socket| which i|
|000031d0| 73 20 64 65 72 69 76 65 | 64 20 66 72 6f 6d 20 61 |s derive|d from a|
|000031e0| 20 67 65 6e 65 72 69 63 | 20 73 65 72 76 65 72 20 | generic| server |
|000031f0| 73 6f 63 6b 65 74 0a 23 | 0a 73 75 62 20 61 63 63 |socket.#|.sub acc|
|00003200| 65 70 74 73 6f 63 6b 20 | 7b 0a 20 20 20 20 6c 6f |eptsock |{. lo|
|00003210| 63 61 6c 28 24 61 64 64 | 72 29 3b 0a 20 20 20 20 |cal($add|r);. |
|00003220| 6c 6f 63 61 6c 28 24 6f | 6c 64 66 68 29 3b 0a 0a |local($o|ldfh);..|
|00003230| 20 20 20 20 24 5f 5b 30 | 5d 20 3d 20 24 5f 5b 31 | $_[0|] = $_[1|
|00003240| 5d 20 2e 20 22 2e 2e 22 | 20 2e 20 24 5f 5f 45 49 |] . ".."| . $__EI|
|00003250| 50 43 53 6e 6f 5f 5f 20 | 2b 2b 3b 20 23 20 6d 61 |PCSno__ |++; # ma|
|00003260| 6b 65 20 69 74 20 75 6e | 69 71 75 65 0a 20 20 20 |ke it un|ique. |
|00003270| 20 24 61 64 64 72 20 3d | 20 61 63 63 65 70 74 28 | $addr =| accept(|
|00003280| 24 5f 5b 30 5d 2c 20 24 | 5f 5b 31 5d 29 20 7c 7c |$_[0], $|_[1]) |||
|00003290| 20 64 69 65 20 22 61 63 | 63 65 70 74 3a 20 24 21 | die "ac|cept: $!|
|000032a0| 5c 6e 22 3b 0a 20 20 20 | 20 24 6f 6c 64 66 68 20 |\n";. | $oldfh |
|000032b0| 3d 20 73 65 6c 65 63 74 | 28 24 5f 5b 30 5d 29 20 |= select|($_[0]) |
|000032c0| 3b 20 24 7c 20 3d 20 31 | 3b 20 73 65 6c 65 63 74 |; $| = 1|; select|
|000032d0| 28 24 6f 6c 64 66 68 29 | 3b 0a 20 20 20 20 24 61 |($oldfh)|;. $a|
|000032e0| 64 64 72 3b 0a 7d 0a 0a | 23 0a 23 20 26 73 65 6c |ddr;.}..|#.# &sel|
|000032f0| 65 63 74 73 6f 63 6b 28 | 40 73 6f 63 6b 65 74 73 |ectsock(|@sockets|
|00003300| 29 0a 23 0a 23 20 52 65 | 74 75 72 6e 73 20 61 76 |).#.# Re|turns av|
|00003310| 61 69 6c 61 62 6c 65 20 | 73 6f 63 6b 65 74 73 20 |ailable |sockets |
|00003320| 66 6f 72 20 72 65 61 64 | 20 28 62 6c 6f 63 6b 73 |for read| (blocks|
|00003330| 29 0a 23 0a 73 75 62 20 | 73 65 6c 65 63 74 73 6f |).#.sub |selectso|
|00003340| 63 6b 20 7b 0a 20 20 20 | 20 26 73 65 6c 65 63 74 |ck {. | &select|
|00003350| 73 6f 63 6b 5f 77 69 74 | 68 5f 74 69 6d 65 6f 75 |sock_wit|h_timeou|
|00003360| 74 28 75 6e 64 65 66 2c | 20 40 5f 29 3b 0a 7d 0a |t(undef,| @_);.}.|
|00003370| 0a 23 0a 23 20 26 73 65 | 6c 65 63 74 73 6f 63 6b |.#.# &se|lectsock|
|00003380| 5f 6e 6f 6e 5f 62 6c 6f | 63 6b 28 40 73 6f 63 6b |_non_blo|ck(@sock|
|00003390| 65 74 73 29 0a 23 0a 23 | 20 52 65 74 75 72 6e 73 |ets).#.#| Returns|
|000033a0| 20 61 76 61 69 6c 61 62 | 6c 65 20 73 6f 63 6b 65 | availab|le socke|
|000033b0| 74 73 20 66 6f 72 20 72 | 65 61 64 20 28 64 6f 65 |ts for r|ead (doe|
|000033c0| 73 6e 27 74 20 62 6c 6f | 63 6b 29 0a 23 0a 73 75 |sn't blo|ck).#.su|
|000033d0| 62 20 73 65 6c 65 63 74 | 73 6f 63 6b 5f 6e 6f 6e |b select|sock_non|
|000033e0| 5f 62 6c 6f 63 6b 20 7b | 0a 20 20 20 20 26 73 65 |_block {|. &se|
|000033f0| 6c 65 63 74 73 6f 63 6b | 5f 77 69 74 68 5f 74 69 |lectsock|_with_ti|
|00003400| 6d 65 6f 75 74 28 30 2c | 20 40 5f 29 3b 0a 7d 0a |meout(0,| @_);.}.|
|00003410| 0a 23 0a 23 20 26 73 65 | 6c 65 63 74 73 6f 63 6b |.#.# &se|lectsock|
|00003420| 5f 77 69 74 68 5f 74 69 | 6d 65 6f 75 74 28 24 74 |_with_ti|meout($t|
|00003430| 69 6d 65 6f 75 74 2c 20 | 40 73 6f 63 6b 65 74 73 |imeout, |@sockets|
|00003440| 29 0a 23 0a 23 20 52 65 | 74 75 72 6e 73 20 61 76 |).#.# Re|turns av|
|00003450| 61 69 6c 61 62 6c 65 20 | 73 6f 63 6b 65 74 73 20 |ailable |sockets |
|00003460| 66 6f 72 20 72 65 61 64 | 20 28 77 69 74 68 20 74 |for read| (with t|
|00003470| 69 6d 65 6f 75 74 29 0a | 23 0a 73 75 62 20 73 65 |imeout).|#.sub se|
|00003480| 6c 65 63 74 73 6f 63 6b | 5f 77 69 74 68 5f 74 69 |lectsock|_with_ti|
|00003490| 6d 65 6f 75 74 20 7b 0a | 20 20 20 20 6c 6f 63 61 |meout {.| loca|
|000034a0| 6c 28 24 6e 66 6f 75 6e | 64 2c 20 24 74 69 6d 65 |l($nfoun|d, $time|
|000034b0| 6c 65 66 74 29 3b 0a 20 | 20 20 20 6c 6f 63 61 6c |left);. | local|
|000034c0| 28 24 72 69 6e 2c 20 24 | 72 6f 75 74 2c 20 24 77 |($rin, $|rout, $w|
|000034d0| 69 6e 2c 20 24 77 6f 75 | 74 2c 20 24 65 6f 75 74 |in, $wou|t, $eout|
|000034e0| 2c 20 24 65 69 6e 29 3b | 0a 20 20 20 20 6c 6f 63 |, $ein);|. loc|
|000034f0| 61 6c 28 24 74 69 6d 65 | 6f 75 74 29 20 3d 20 73 |al($time|out) = s|
|00003500| 68 69 66 74 3b 0a 0a 20 | 20 20 20 24 72 69 6e 20 |hift;.. | $rin |
|00003510| 3d 20 26 73 65 74 73 6f | 63 6b 62 69 74 73 28 40 |= &setso|ckbits(@|
|00003520| 5f 29 3b 0a 20 20 20 20 | 28 24 6e 66 6f 75 6e 64 |_);. |($nfound|
|00003530| 2c 20 24 74 69 6d 65 6c | 65 66 74 29 20 3d 20 73 |, $timel|eft) = s|
|00003540| 65 6c 65 63 74 28 24 72 | 6f 75 74 3d 24 72 69 6e |elect($r|out=$rin|
|00003550| 2c 20 24 77 6f 75 74 3d | 24 77 69 6e 2c 20 24 65 |, $wout=|$win, $e|
|00003560| 6f 75 74 3d 24 65 69 6e | 2c 20 24 74 69 6d 65 6f |out=$ein|, $timeo|
|00003570| 75 74 29 3b 0a 0a 20 20 | 20 20 67 72 65 70 28 76 |ut);.. | grep(v|
|00003580| 65 63 28 24 72 6f 75 74 | 2c 66 69 6c 65 6e 6f 28 |ec($rout|,fileno(|
|00003590| 24 5f 29 2c 31 29 2c 40 | 5f 29 3b 0a 7d 0a 0a 23 |$_),1),@|_);.}..#|
|000035a0| 0a 23 20 26 73 65 74 73 | 6f 63 6b 62 69 74 73 28 |.# &sets|ockbits(|
|000035b0| 40 73 6f 63 6b 65 74 73 | 29 0a 23 0a 23 20 52 65 |@sockets|).#.# Re|
|000035c0| 74 75 72 6e 73 20 61 20 | 62 69 74 76 65 63 74 6f |turns a |bitvecto|
|000035d0| 72 20 63 6f 72 72 65 73 | 70 6f 6e 64 69 6e 67 20 |r corres|ponding |
|000035e0| 74 6f 20 73 6f 63 6b 65 | 74 73 20 6c 69 73 74 0a |to socke|ts list.|
|000035f0| 23 0a 73 75 62 20 73 65 | 74 73 6f 63 6b 62 69 74 |#.sub se|tsockbit|
|00003600| 73 7b 0a 20 20 20 20 6c | 6f 63 61 6c 28 40 66 68 |s{. l|ocal(@fh|
|00003610| 73 29 20 3d 20 40 5f 3b | 0a 20 20 20 20 6c 6f 63 |s) = @_;|. loc|
|00003620| 61 6c 28 24 62 69 74 73 | 29 3b 0a 20 20 20 20 66 |al($bits|);. f|
|00003630| 6f 72 20 28 40 66 68 73 | 29 20 7b 0a 20 20 20 20 |or (@fhs|) {. |
|00003640| 20 20 20 20 76 65 63 28 | 24 62 69 74 73 2c 20 66 | vec(|$bits, f|
|00003650| 69 6c 65 6e 6f 28 24 5f | 29 2c 20 31 29 20 3d 20 |ileno($_|), 1) = |
|00003660| 31 3b 0a 20 20 20 20 7d | 0a 20 20 20 20 24 62 69 |1;. }|. $bi|
|00003670| 74 73 3b 0a 7d 0a 0a 23 | 0a 23 20 26 69 6e 65 74 |ts;.}..#|.# &inet|
|00003680| 5f 61 64 64 72 28 24 61 | 64 64 72 29 0a 23 0a 23 |_addr($a|ddr).#.#|
|00003690| 20 43 6f 6e 76 65 72 74 | 73 20 61 6e 20 69 6e 74 | Convert|s an int|
|000036a0| 65 72 6e 65 74 20 64 6f | 74 20 6e 6f 74 61 74 69 |ernet do|t notati|
|000036b0| 6f 6e 20 28 23 23 2e 23 | 23 2e 23 23 2e 23 23 29 |on (##.#|#.##.##)|
|000036c0| 20 74 6f 20 61 6e 20 69 | 6e 74 65 72 6e 65 74 20 | to an i|nternet |
|000036d0| 61 64 64 72 65 73 73 0a | 23 0a 73 75 62 20 69 6e |address.|#.sub in|
|000036e0| 65 74 5f 61 64 64 72 20 | 7b 0a 20 20 20 20 70 61 |et_addr |{. pa|
|000036f0| 63 6b 28 22 43 34 22 2c | 20 73 70 6c 69 74 28 2f |ck("C4",| split(/|
|00003700| 5c 2e 2f 2c 20 24 5f 5b | 30 5d 29 29 3b 0a 7d 0a |\./, $_[|0]));.}.|
|00003710| 0a 31 3b 0a 40 2f 2f 45 | 2a 4f 2a 46 20 65 61 73 |.1;.@//E|*O*F eas|
|00003720| 79 2d 69 70 63 2e 70 6c | 2f 2f 0a 63 68 6d 6f 64 |y-ipc.pl|//.chmod|
|00003730| 20 75 3d 72 2c 67 3d 72 | 2c 6f 3d 72 20 65 61 73 | u=r,g=r|,o=r eas|
|00003740| 79 2d 69 70 63 2e 70 6c | 0a 20 0a 65 78 69 74 20 |y-ipc.pl|. .exit |
|00003750| 30 0a 2d 2d 0a 20 73 61 | 6b 6f 68 40 73 72 61 2e |0.--. sa|koh@sra.|
|00003760| 63 6f 2e 6a 70 0a 22 57 | 68 65 72 65 6f 66 20 6f |co.jp."W|hereof o|
|00003770| 6e 65 20 63 61 6e 6e 6f | 74 20 73 70 65 61 6b 2c |ne canno|t speak,|
|00003780| 20 74 68 65 72 65 6f 66 | 20 6f 6e 65 20 6d 75 73 | thereof| one mus|
|00003790| 74 20 72 65 6d 61 69 6e | 20 73 69 6c 65 6e 74 2e |t remain| silent.|
|000037a0| 22 20 20 2d 2d 2d 57 69 | 74 74 67 65 6e 73 74 65 |" ---Wi|ttgenste|
|000037b0| 69 6e 0a 22 53 6f 6d 65 | 74 69 6d 65 73 20 6e 6f |in."Some|times no|
|000037c0| 69 73 65 20 69 73 20 73 | 69 67 6e 69 66 69 63 61 |ise is s|ignifica|
|000037d0| 6e 74 2e 22 20 20 20 20 | 20 20 20 20 20 20 20 20 |nt." | |
|000037e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000037f0| 2d 2d 2d 57 69 6c 6c 69 | 61 6d 20 48 65 77 6c 65 |---Willi|am Hewle|
|00003800| 74 74 0a 0a | |tt.. | |
+--------+-------------------------+-------------------------+--------+--------+