Hex Artifact Content
Not logged in

Artifact 757aaea09a6bfbdac1d9b70af30d6774a4dffe18:


0000: 5c 20 41 6e 64 6f 69 64 20 73 70 65 63 69 66 69  \ Andoid specifi
0010: 63 20 6e 65 74 77 6f 72 6b 20 73 74 75 66 66 0a  c network stuff.
0020: 0a 5c 20 43 6f 70 79 72 69 67 68 74 20 28 43 29  .\ Copyright (C)
0030: 20 32 30 31 36 20 20 20 42 65 72 6e 64 20 50 61   2016   Bernd Pa
0040: 79 73 61 6e 0a 0a 5c 20 54 68 69 73 20 70 72 6f  ysan..\ This pro
0050: 67 72 61 6d 20 69 73 20 66 72 65 65 20 73 6f 66  gram is free sof
0060: 74 77 61 72 65 3a 20 79 6f 75 20 63 61 6e 20 72  tware: you can r
0070: 65 64 69 73 74 72 69 62 75 74 65 20 69 74 20 61  edistribute it a
0080: 6e 64 2f 6f 72 20 6d 6f 64 69 66 79 0a 5c 20 69  nd/or modify.\ i
0090: 74 20 75 6e 64 65 72 20 74 68 65 20 74 65 72 6d  t under the term
00a0: 73 20 6f 66 20 74 68 65 20 47 4e 55 20 41 66 66  s of the GNU Aff
00b0: 65 72 6f 20 47 65 6e 65 72 61 6c 20 50 75 62 6c  ero General Publ
00c0: 69 63 20 4c 69 63 65 6e 73 65 20 61 73 20 70 75  ic License as pu
00d0: 62 6c 69 73 68 65 64 20 62 79 0a 5c 20 74 68 65  blished by.\ the
00e0: 20 46 72 65 65 20 53 6f 66 74 77 61 72 65 20 46   Free Software F
00f0: 6f 75 6e 64 61 74 69 6f 6e 2c 20 65 69 74 68 65  oundation, eithe
0100: 72 20 76 65 72 73 69 6f 6e 20 33 20 6f 66 20 74  r version 3 of t
0110: 68 65 20 4c 69 63 65 6e 73 65 2c 20 6f 72 0a 5c  he License, or.\
0120: 20 28 61 74 20 79 6f 75 72 20 6f 70 74 69 6f 6e   (at your option
0130: 29 20 61 6e 79 20 6c 61 74 65 72 20 76 65 72 73  ) any later vers
0140: 69 6f 6e 2e 0a 0a 5c 20 54 68 69 73 20 70 72 6f  ion...\ This pro
0150: 67 72 61 6d 20 69 73 20 64 69 73 74 72 69 62 75  gram is distribu
0160: 74 65 64 20 69 6e 20 74 68 65 20 68 6f 70 65 20  ted in the hope 
0170: 74 68 61 74 20 69 74 20 77 69 6c 6c 20 62 65 20  that it will be 
0180: 75 73 65 66 75 6c 2c 0a 5c 20 62 75 74 20 57 49  useful,.\ but WI
0190: 54 48 4f 55 54 20 41 4e 59 20 57 41 52 52 41 4e  THOUT ANY WARRAN
01a0: 54 59 3b 20 77 69 74 68 6f 75 74 20 65 76 65 6e  TY; without even
01b0: 20 74 68 65 20 69 6d 70 6c 69 65 64 20 77 61 72   the implied war
01c0: 72 61 6e 74 79 20 6f 66 0a 5c 20 4d 45 52 43 48  ranty of.\ MERCH
01d0: 41 4e 54 41 42 49 4c 49 54 59 20 6f 72 20 46 49  ANTABILITY or FI
01e0: 54 4e 45 53 53 20 46 4f 52 20 41 20 50 41 52 54  TNESS FOR A PART
01f0: 49 43 55 4c 41 52 20 50 55 52 50 4f 53 45 2e 20  ICULAR PURPOSE. 
0200: 20 53 65 65 20 74 68 65 0a 5c 20 47 4e 55 20 41   See the.\ GNU A
0210: 66 66 65 72 6f 20 47 65 6e 65 72 61 6c 20 50 75  ffero General Pu
0220: 62 6c 69 63 20 4c 69 63 65 6e 73 65 20 66 6f 72  blic License for
0230: 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e 0a 0a   more details...
0240: 5c 20 59 6f 75 20 73 68 6f 75 6c 64 20 68 61 76  \ You should hav
0250: 65 20 72 65 63 65 69 76 65 64 20 61 20 63 6f 70  e received a cop
0260: 79 20 6f 66 20 74 68 65 20 47 4e 55 20 41 66 66  y of the GNU Aff
0270: 65 72 6f 20 47 65 6e 65 72 61 6c 20 50 75 62 6c  ero General Publ
0280: 69 63 20 4c 69 63 65 6e 73 65 0a 5c 20 61 6c 6f  ic License.\ alo
0290: 6e 67 20 77 69 74 68 20 74 68 69 73 20 70 72 6f  ng with this pro
02a0: 67 72 61 6d 2e 20 20 49 66 20 6e 6f 74 2c 20 73  gram.  If not, s
02b0: 65 65 20 3c 68 74 74 70 3a 2f 2f 77 77 77 2e 67  ee <http://www.g
02c0: 6e 75 2e 6f 72 67 2f 6c 69 63 65 6e 73 65 73 2f  nu.org/licenses/
02d0: 3e 2e 0a 0a 61 6c 73 6f 20 61 6e 64 72 6f 69 64  >...also android
02e0: 20 61 6c 73 6f 20 6a 6e 69 0a 3a 6e 6f 6e 61 6d   also jni.:nonam
02f0: 65 20 20 64 65 66 65 72 73 20 61 6e 64 72 6f 69  e  defers androi
0300: 64 2d 6e 65 74 77 6f 72 6b 0a 20 20 20 20 62 65  d-network.    be
0310: 61 63 6f 6e 73 20 40 20 49 46 0a 09 6e 65 74 77  acons @ IF..netw
0320: 6f 72 6b 2d 69 6e 66 6f 20 64 75 70 20 20 49 46  ork-info dup  IF
0330: 20 20 5d 78 72 65 66 20 64 68 74 2d 62 65 61 63    ]xref dht-beac
0340: 6f 6e 20 20 74 72 75 65 0a 09 54 48 45 4e 20 20  on  true..THEN  
0350: 20 74 6f 20 63 6f 6e 6e 65 63 74 65 64 3f 0a 20   to connected?. 
0360: 20 20 20 54 48 45 4e 20 3b 0a 69 73 20 61 6e 64     THEN ;.is and
0370: 72 6f 69 64 2d 6e 65 74 77 6f 72 6b 0a 70 72 65  roid-network.pre
0380: 76 69 6f 75 73 20 70 72 65 76 69 6f 75 73 0a 0a  vious previous..
0390: 30 20 5b 49 46 5d 0a 4c 6f 63 61 6c 20 56 61 72  0 [IF].Local Var
03a0: 69 61 62 6c 65 73 3a 0a 66 6f 72 74 68 2d 6c 6f  iables:.forth-lo
03b0: 63 61 6c 2d 77 6f 72 64 73 3a 0a 20 20 20 20 28  cal-words:.    (
03c0: 0a 20 20 20 20 20 28 28 22 6e 65 74 32 6f 3a 22  .     (("net2o:"
03d0: 20 22 2b 6e 65 74 32 6f 3a 22 29 20 64 65 66 69   "+net2o:") defi
03e0: 6e 69 74 69 6f 6e 2d 73 74 61 72 74 65 72 20 28  nition-starter (
03f0: 66 6f 6e 74 2d 6c 6f 63 6b 2d 6b 65 79 77 6f 72  font-lock-keywor
0400: 64 2d 66 61 63 65 20 2e 20 31 29 0a 20 20 20 20  d-face . 1).    
0410: 20 20 22 5b 20 5c 74 5c 6e 5d 22 20 74 20 6e 61    "[ \t\n]" t na
0420: 6d 65 20 28 66 6f 6e 74 2d 6c 6f 63 6b 2d 66 75  me (font-lock-fu
0430: 6e 63 74 69 6f 6e 2d 6e 61 6d 65 2d 66 61 63 65  nction-name-face
0440: 20 2e 20 33 29 29 0a 20 20 20 20 20 28 22 5b 61   . 3)).     ("[a
0450: 2d 7a 30 2d 39 5d 2b 28 22 20 69 6d 6d 65 64 69  -z0-9]+(" immedi
0460: 61 74 65 20 28 66 6f 6e 74 2d 6c 6f 63 6b 2d 63  ate (font-lock-c
0470: 6f 6d 6d 65 6e 74 2d 66 61 63 65 20 2e 20 31 29  omment-face . 1)
0480: 0a 20 20 20 20 20 20 22 29 22 20 6e 69 6c 20 63  .      ")" nil c
0490: 6f 6d 6d 65 6e 74 20 28 66 6f 6e 74 2d 6c 6f 63  omment (font-loc
04a0: 6b 2d 63 6f 6d 6d 65 6e 74 2d 66 61 63 65 20 2e  k-comment-face .
04b0: 20 31 29 29 0a 20 20 20 20 29 0a 66 6f 72 74 68   1)).    ).forth
04c0: 2d 6c 6f 63 61 6c 2d 69 6e 64 65 6e 74 2d 77 6f  -local-indent-wo
04d0: 72 64 73 3a 0a 20 20 20 20 28 0a 20 20 20 20 20  rds:.    (.     
04e0: 28 28 22 6e 65 74 32 6f 3a 22 20 22 2b 6e 65 74  (("net2o:" "+net
04f0: 32 6f 3a 22 29 20 28 30 20 2e 20 32 29 20 28 30  2o:") (0 . 2) (0
0500: 20 2e 20 32 29 20 6e 6f 6e 2d 69 6d 6d 65 64 69   . 2) non-immedi
0510: 61 74 65 29 0a 20 20 20 20 29 0a 45 6e 64 3a 0a  ate).    ).End:.
0520: 5b 54 48 45 4e 5d                                [THEN]