ionian 0.6.12 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -930,7 +930,7 @@ connected client is passed to the block as an Ionain::Client.</p>
930
930
  </div>
931
931
 
932
932
  <div id="footer">
933
- Generated on Mon Jan 26 21:45:48 2015 by
933
+ Generated on Wed Jan 28 16:07:20 2015 by
934
934
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
935
935
  0.8.7.6 (ruby-2.1.5).
936
936
  </div>
@@ -242,6 +242,39 @@
242
242
 
243
243
 
244
244
 
245
+ <h2>
246
+ Class Method Summary
247
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
248
+ </h2>
249
+
250
+ <ul class="summary">
251
+
252
+ <li class="public ">
253
+ <span class="summary_signature">
254
+
255
+ <a href="#create_broadcast_socket-class_method" title="create_broadcast_socket (class method)">+ (Ionian::Socket) <strong>create_broadcast_socket</strong>(**kwargs) </a>
256
+
257
+
258
+
259
+ </span>
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+ <span class="summary_desc"><div class='inline'>
270
+ <p>A broadcast socket.</p>
271
+ </div></span>
272
+
273
+ </li>
274
+
275
+
276
+ </ul>
277
+
245
278
  <h2>
246
279
  Instance Method Summary
247
280
  <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
@@ -387,7 +420,7 @@
387
420
 
388
421
 
389
422
  <span class="summary_desc"><div class='inline'>
390
- <p>Returns true if there is data in the receive buffer.</p>
423
+ <p>data until giving up.</p>
391
424
  </div></span>
392
425
 
393
426
  </li>
@@ -471,7 +504,34 @@ any string not already ending with one.</p>
471
504
  <li class="public ">
472
505
  <span class="summary_signature">
473
506
 
474
- <a href="#register_observer-instance_method" title="#register_observer (instance method)">- (Object) <strong>register_observer</strong>(&amp;block) </a>
507
+ <a href="#register_error_handler-instance_method" title="#register_error_handler (instance method)">- (Block) <strong>register_error_handler</strong> {|Exception, self| ... }</a>
508
+
509
+
510
+
511
+ (also: #on_error)
512
+
513
+ </span>
514
+
515
+
516
+
517
+
518
+
519
+
520
+
521
+
522
+
523
+ <span class="summary_desc"><div class='inline'>
524
+ <p>Register a block to be called when <span class='object_link'><a href="Extension/IO.html#run_match-instance_method" title="Ionian::Extension::IO#run_match (method)">Extension::IO#run_match</a></span> raises
525
+ an error.</p>
526
+ </div></span>
527
+
528
+ </li>
529
+
530
+
531
+ <li class="public ">
532
+ <span class="summary_signature">
533
+
534
+ <a href="#register_match_handler-instance_method" title="#register_match_handler (instance method)">- (Block) <strong>register_match_handler</strong> {|MatchData, self| ... }</a>
475
535
 
476
536
 
477
537
 
@@ -488,7 +548,57 @@ any string not already ending with one.</p>
488
548
 
489
549
 
490
550
  <span class="summary_desc"><div class='inline'>
491
- <p>Register a block to be called when #run_match receives matched data.</p>
551
+ <p>Register a block to be called when <span class='object_link'><a href="Extension/IO.html#run_match-instance_method" title="Ionian::Extension::IO#run_match (method)">Extension::IO#run_match</a></span>
552
+ receives matched data.</p>
553
+ </div></span>
554
+
555
+ </li>
556
+
557
+
558
+ <li class="public deprecated">
559
+ <span class="summary_signature">
560
+
561
+ <a href="#register_observer-instance_method" title="#register_observer (instance method)">- (Object) <strong>register_observer</strong>(&amp;block) </a>
562
+
563
+
564
+
565
+ </span>
566
+
567
+
568
+
569
+
570
+
571
+ <span class="deprecated note title">deprecated</span>
572
+
573
+
574
+
575
+ <span class="summary_desc"><strong>Deprecated.</strong> <div class='inline'>
576
+ <p>Use <span class='object_link'><a href="#register_match_handler-instance_method" title="Ionian::Socket#register_match_handler (method)">#register_match_handler</a></span> instead.</p>
577
+ </div></span>
578
+
579
+ </li>
580
+
581
+
582
+ <li class="public ">
583
+ <span class="summary_signature">
584
+
585
+ <a href="#unregister_error_handler-instance_method" title="#unregister_error_handler (instance method)">- (Object) <strong>unregister_error_handler</strong>(&amp;block) </a>
586
+
587
+
588
+
589
+ </span>
590
+
591
+
592
+
593
+
594
+
595
+
596
+
597
+
598
+
599
+ <span class="summary_desc"><div class='inline'>
600
+ <p>Unregister a block from being called when a IO#run_match error is
601
+ raised.</p>
492
602
  </div></span>
493
603
 
494
604
  </li>
@@ -497,7 +607,7 @@ any string not already ending with one.</p>
497
607
  <li class="public ">
498
608
  <span class="summary_signature">
499
609
 
500
- <a href="#unregister_observer-instance_method" title="#unregister_observer (instance method)">- (Object) <strong>unregister_observer</strong>(&amp;block) </a>
610
+ <a href="#unregister_match_handler-instance_method" title="#unregister_match_handler (instance method)">- (Object) <strong>unregister_match_handler</strong>(&amp;block) </a>
501
611
 
502
612
 
503
613
 
@@ -515,13 +625,37 @@ any string not already ending with one.</p>
515
625
  <p>Unregister a block from being called when matched data is received.</p>
516
626
  </div></span>
517
627
 
628
+ </li>
629
+
630
+
631
+ <li class="public deprecated">
632
+ <span class="summary_signature">
633
+
634
+ <a href="#unregister_observer-instance_method" title="#unregister_observer (instance method)">- (Object) <strong>unregister_observer</strong>(&amp;block) </a>
635
+
636
+
637
+
638
+ </span>
639
+
640
+
641
+
642
+
643
+
644
+ <span class="deprecated note title">deprecated</span>
645
+
646
+
647
+
648
+ <span class="summary_desc"><strong>Deprecated.</strong> <div class='inline'>
649
+ <p>Use <span class='object_link'><a href="#unregister_match_handler-instance_method" title="Ionian::Socket#unregister_match_handler (method)">#unregister_match_handler</a></span> instead.</p>
650
+ </div></span>
651
+
518
652
  </li>
519
653
 
520
654
 
521
655
  <li class="public ">
522
656
  <span class="summary_signature">
523
657
 
524
- <a href="#write-instance_method" title="#write (instance method)">- (Object) <strong>write</strong>(string) </a>
658
+ <a href="#write-instance_method" title="#write (instance method)">- (Fixnum) <strong>write</strong>(string) </a>
525
659
 
526
660
 
527
661
 
@@ -841,18 +975,6 @@ the block.</p>
841
975
  <pre class="lines">
842
976
 
843
977
 
844
- 76
845
- 77
846
- 78
847
- 79
848
- 80
849
- 81
850
- 82
851
- 83
852
- 84
853
- 85
854
- 86
855
- 87
856
978
  88
857
979
  89
858
980
  90
@@ -921,15 +1043,29 @@ the block.</p>
921
1043
  153
922
1044
  154
923
1045
  155
924
- 156</pre>
1046
+ 156
1047
+ 157
1048
+ 158
1049
+ 159
1050
+ 160
1051
+ 161
1052
+ 162
1053
+ 163
1054
+ 164
1055
+ 165
1056
+ 166
1057
+ 167
1058
+ 168
1059
+ 169</pre>
925
1060
  </td>
926
1061
  <td>
927
- <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 76</span>
1062
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 88</span>
928
1063
 
929
1064
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_existing_socket'>existing_socket</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
930
1065
  <span class='ivar'>@socket</span> <span class='op'>=</span> <span class='id identifier rubyid_existing_socket'>existing_socket</span>
931
1066
 
932
- <span class='ivar'>@ionian_listeners</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1067
+ <span class='ivar'>@ionian_match_handlers</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1068
+ <span class='ivar'>@ionian_error_handlers</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
933
1069
 
934
1070
  <span class='ivar'>@expression</span> <span class='op'>=</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span> <span class='symbol'>:expression</span><span class='comma'>,</span> <span class='kw'>nil</span>
935
1071
 
@@ -1045,12 +1181,12 @@ the block.</p>
1045
1181
  <pre class="lines">
1046
1182
 
1047
1183
 
1048
- 15
1049
1184
  16
1050
- 17</pre>
1185
+ 17
1186
+ 18</pre>
1051
1187
  </td>
1052
1188
  <td>
1053
- <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 15</span>
1189
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 16</span>
1054
1190
 
1055
1191
  <span class='kw'>def</span> <span class='id identifier rubyid_bind_port'>bind_port</span>
1056
1192
  <span class='ivar'>@bind_port</span>
@@ -1088,12 +1224,12 @@ the block.</p>
1088
1224
  <pre class="lines">
1089
1225
 
1090
1226
 
1091
- 9
1092
1227
  10
1093
- 11</pre>
1228
+ 11
1229
+ 12</pre>
1094
1230
  </td>
1095
1231
  <td>
1096
- <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 9</span>
1232
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 10</span>
1097
1233
 
1098
1234
  <span class='kw'>def</span> <span class='id identifier rubyid_host'>host</span>
1099
1235
  <span class='ivar'>@host</span>
@@ -1131,12 +1267,12 @@ the block.</p>
1131
1267
  <pre class="lines">
1132
1268
 
1133
1269
 
1134
- 12
1135
1270
  13
1136
- 14</pre>
1271
+ 14
1272
+ 15</pre>
1137
1273
  </td>
1138
1274
  <td>
1139
- <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 12</span>
1275
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 13</span>
1140
1276
 
1141
1277
  <span class='kw'>def</span> <span class='id identifier rubyid_port'>port</span>
1142
1278
  <span class='ivar'>@port</span>
@@ -1179,12 +1315,12 @@ the block.</p>
1179
1315
  <pre class="lines">
1180
1316
 
1181
1317
 
1182
- 19
1183
1318
  20
1184
- 21</pre>
1319
+ 21
1320
+ 22</pre>
1185
1321
  </td>
1186
1322
  <td>
1187
- <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 19</span>
1323
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 20</span>
1188
1324
 
1189
1325
  <span class='kw'>def</span> <span class='id identifier rubyid_protocol'>protocol</span>
1190
1326
  <span class='ivar'>@protocol</span>
@@ -1197,6 +1333,140 @@ the block.</p>
1197
1333
  </div>
1198
1334
 
1199
1335
 
1336
+ <div id="class_method_details" class="method_details_list">
1337
+ <h2>Class Method Details</h2>
1338
+
1339
+
1340
+ <div class="method_details first">
1341
+ <h3 class="signature first" id="create_broadcast_socket-class_method">
1342
+
1343
+ + (<tt><span class='object_link'><a href="" title="Ionian::Socket (class)">Ionian::Socket</a></span></tt>) <strong>create_broadcast_socket</strong>(**kwargs)
1344
+
1345
+
1346
+
1347
+
1348
+
1349
+ </h3><div class="docstring">
1350
+ <div class="discussion">
1351
+
1352
+ <p>Returns a broadcast socket.</p>
1353
+
1354
+
1355
+ </div>
1356
+ </div>
1357
+ <div class="tags">
1358
+ <p class="tag_title">Parameters:</p>
1359
+ <ul class="param">
1360
+
1361
+ <li>
1362
+
1363
+ <span class='name'>kwargs</span>
1364
+
1365
+
1366
+ <span class='type'>(<tt>Hash</tt>)</span>
1367
+
1368
+
1369
+
1370
+ &mdash;
1371
+ <div class='inline'>
1372
+ <p>a customizable set of options</p>
1373
+ </div>
1374
+
1375
+ </li>
1376
+
1377
+ </ul>
1378
+
1379
+
1380
+
1381
+
1382
+ <p class="tag_title">Options Hash (<tt>**kwargs</tt>):</p>
1383
+ <ul class="option">
1384
+
1385
+ <li>
1386
+ <span class="name">:port</span>
1387
+ <span class="type">(<tt>Fixnum</tt>)</span>
1388
+ <span class="default">
1389
+
1390
+ </span>
1391
+
1392
+ &mdash; <div class='inline'>
1393
+ <p>Port to broadcast on.</p>
1394
+ </div>
1395
+
1396
+ </li>
1397
+
1398
+ <li>
1399
+ <span class="name">:address</span>
1400
+ <span class="type">(<tt>String</tt>)</span>
1401
+ <span class="default">
1402
+
1403
+ &mdash; default:
1404
+ <tt>&#39;255.255.255.255&#39;</tt>
1405
+
1406
+ </span>
1407
+
1408
+ &mdash; <div class='inline'>
1409
+ <p>Address to broadcast on.</p>
1410
+ </div>
1411
+
1412
+ </li>
1413
+
1414
+ </ul>
1415
+
1416
+
1417
+ <p class="tag_title">Returns:</p>
1418
+ <ul class="return">
1419
+
1420
+ <li>
1421
+
1422
+
1423
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Ionian::Socket (class)">Ionian::Socket</a></span></tt>)</span>
1424
+
1425
+
1426
+
1427
+ &mdash;
1428
+ <div class='inline'>
1429
+ <p>a broadcast socket.</p>
1430
+ </div>
1431
+
1432
+ </li>
1433
+
1434
+ </ul>
1435
+
1436
+ <p class="tag_title">See Also:</p>
1437
+ <ul class="see">
1438
+
1439
+ <li><span class='object_link'><a href="#initialize-instance_method" title="Ionian::Socket#initialize (method)">Full list of socket options.</a></span></li>
1440
+
1441
+ </ul>
1442
+
1443
+ </div><table class="source_code">
1444
+ <tr>
1445
+ <td>
1446
+ <pre class="lines">
1447
+
1448
+
1449
+ 29
1450
+ 30
1451
+ 31
1452
+ 32
1453
+ 33</pre>
1454
+ </td>
1455
+ <td>
1456
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 29</span>
1457
+
1458
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create_broadcast_socket'>create_broadcast_socket</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span>
1459
+ <span class='id identifier rubyid_kwargs'>kwargs</span><span class='lbracket'>[</span><span class='symbol'>:host</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:address</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>255.255.255.255</span><span class='tstring_end'>&#39;</span></span>
1460
+ <span class='id identifier rubyid_kwargs'>kwargs</span><span class='lbracket'>[</span><span class='symbol'>:broadcast</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>true</span>
1461
+ <span class='id identifier rubyid_new'>new</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span>
1462
+ <span class='kw'>end</span></pre>
1463
+ </td>
1464
+ </tr>
1465
+ </table>
1466
+ </div>
1467
+
1468
+ </div>
1469
+
1200
1470
  <div id="instance_method_details" class="method_details_list">
1201
1471
  <h2>Instance Method Details</h2>
1202
1472
 
@@ -1240,13 +1510,13 @@ the block.</p>
1240
1510
  <pre class="lines">
1241
1511
 
1242
1512
 
1243
- 226
1244
- 227
1245
- 228
1246
- 229</pre>
1513
+ 272
1514
+ 273
1515
+ 274
1516
+ 275</pre>
1247
1517
  </td>
1248
1518
  <td>
1249
- <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 226</span>
1519
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 272</span>
1250
1520
 
1251
1521
  <span class='kw'>def</span> <span class='id identifier rubyid_closed?'>closed?</span>
1252
1522
  <span class='kw'>return</span> <span class='kw'>true</span> <span class='kw'>unless</span> <span class='ivar'>@socket</span>
@@ -1348,20 +1618,20 @@ the block.</p>
1348
1618
  <pre class="lines">
1349
1619
 
1350
1620
 
1351
- 183
1352
- 184
1353
- 185
1354
- 186
1355
- 187
1356
- 188
1357
- 189
1358
- 190
1359
- 191
1360
- 192
1361
- 193</pre>
1621
+ 196
1622
+ 197
1623
+ 198
1624
+ 199
1625
+ 200
1626
+ 201
1627
+ 202
1628
+ 203
1629
+ 204
1630
+ 205
1631
+ 206</pre>
1362
1632
  </td>
1363
1633
  <td>
1364
- <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 183</span>
1634
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 196</span>
1365
1635
 
1366
1636
  <span class='kw'>def</span> <span class='id identifier rubyid_cmd'>cmd</span> <span class='id identifier rubyid_data'>data</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
1367
1637
  <span class='id identifier rubyid_create_socket'>create_socket</span> <span class='kw'>unless</span> <span class='ivar'>@persistent</span>
@@ -1405,12 +1675,12 @@ the block.</p>
1405
1675
  <pre class="lines">
1406
1676
 
1407
1677
 
1408
- 159
1409
- 160
1410
- 161</pre>
1678
+ 172
1679
+ 173
1680
+ 174</pre>
1411
1681
  </td>
1412
1682
  <td>
1413
- <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 159</span>
1683
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 172</span>
1414
1684
 
1415
1685
  <span class='kw'>def</span> <span class='id identifier rubyid_expression'>expression</span>
1416
1686
  <span class='ivar'>@expression</span> <span class='op'>||</span> <span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_expression'>expression</span>
@@ -1446,13 +1716,13 @@ the block.</p>
1446
1716
  <pre class="lines">
1447
1717
 
1448
1718
 
1449
- 164
1450
- 165
1451
- 166
1452
- 167</pre>
1719
+ 177
1720
+ 178
1721
+ 179
1722
+ 180</pre>
1453
1723
  </td>
1454
1724
  <td>
1455
- <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 164</span>
1725
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 177</span>
1456
1726
 
1457
1727
  <span class='kw'>def</span> <span class='id identifier rubyid_expression='>expression=</span> <span class='id identifier rubyid_exp'>exp</span>
1458
1728
  <span class='ivar'>@expression</span> <span class='op'>=</span> <span class='id identifier rubyid_exp'>exp</span>
@@ -1490,12 +1760,12 @@ non-persistent sockets.</p>
1490
1760
  <pre class="lines">
1491
1761
 
1492
1762
 
1493
- 233
1494
- 234
1495
- 235</pre>
1763
+ 279
1764
+ 280
1765
+ 281</pre>
1496
1766
  </td>
1497
1767
  <td>
1498
- <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 233</span>
1768
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 279</span>
1499
1769
 
1500
1770
  <span class='kw'>def</span> <span class='id identifier rubyid_flush'>flush</span>
1501
1771
  <span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_flush'>flush</span> <span class='kw'>if</span> <span class='ivar'>@persistent</span>
@@ -1517,26 +1787,73 @@ non-persistent sockets.</p>
1517
1787
  </h3><div class="docstring">
1518
1788
  <div class="discussion">
1519
1789
 
1520
- <p>Returns true if there is data in the receive buffer. Args:</p>
1521
-
1522
- <pre class="code ruby"><code class="ruby">Timeout: Number of seconds to wait for data until
1523
- giving up. Set to nil for blocking.</code></pre>
1790
+ <p>data until giving up. Set to nil for blocking.</p>
1524
1791
 
1525
1792
 
1526
1793
  </div>
1527
1794
  </div>
1528
1795
  <div class="tags">
1529
-
1530
- <p class="tag_title">Returns:</p>
1531
- <ul class="return">
1796
+ <p class="tag_title">Parameters:</p>
1797
+ <ul class="param">
1532
1798
 
1533
1799
  <li>
1534
1800
 
1801
+ <span class='name'>kwargs</span>
1535
1802
 
1536
- <span class='type'>(<tt>Boolean</tt>)</span>
1537
1803
 
1804
+ <span class='type'>(<tt>Hash</tt>)</span>
1538
1805
 
1539
1806
 
1807
+
1808
+ &mdash;
1809
+ <div class='inline'>
1810
+ <p>a customizable set of options</p>
1811
+ </div>
1812
+
1813
+ </li>
1814
+
1815
+ </ul>
1816
+
1817
+
1818
+
1819
+
1820
+ <p class="tag_title">Options Hash (<tt>**kwargs</tt>):</p>
1821
+ <ul class="option">
1822
+
1823
+ <li>
1824
+ <span class="name">:timeout</span>
1825
+ <span class="type">(<tt>Fixnum</tt>, <tt>nil</tt>)</span>
1826
+ <span class="default">
1827
+
1828
+ &mdash; default:
1829
+ <tt>0</tt>
1830
+
1831
+ </span>
1832
+
1833
+ &mdash; <div class='inline'>
1834
+ <p>Number of seconds to wait for</p>
1835
+ </div>
1836
+
1837
+ </li>
1838
+
1839
+ </ul>
1840
+
1841
+
1842
+ <p class="tag_title">Returns:</p>
1843
+ <ul class="return">
1844
+
1845
+ <li>
1846
+
1847
+
1848
+ <span class='type'>(<tt>Boolean</tt>)</span>
1849
+
1850
+
1851
+
1852
+ &mdash;
1853
+ <div class='inline'>
1854
+ <p>True if there is data in the receive buffer.</p>
1855
+ </div>
1856
+
1540
1857
  </li>
1541
1858
 
1542
1859
  </ul>
@@ -1547,13 +1864,13 @@ non-persistent sockets.</p>
1547
1864
  <pre class="lines">
1548
1865
 
1549
1866
 
1550
- 220
1551
- 221
1552
- 222
1553
- 223</pre>
1867
+ 266
1868
+ 267
1869
+ 268
1870
+ 269</pre>
1554
1871
  </td>
1555
1872
  <td>
1556
- <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 220</span>
1873
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 266</span>
1557
1874
 
1558
1875
  <span class='kw'>def</span> <span class='id identifier rubyid_has_data?'>has_data?</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span>
1559
1876
  <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='ivar'>@socket</span>
@@ -1603,12 +1920,12 @@ non-persistent sockets.</p>
1603
1920
  <pre class="lines">
1604
1921
 
1605
1922
 
1606
- 170
1607
- 171
1608
- 172</pre>
1923
+ 183
1924
+ 184
1925
+ 185</pre>
1609
1926
  </td>
1610
1927
  <td>
1611
- <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 170</span>
1928
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 183</span>
1612
1929
 
1613
1930
  <span class='kw'>def</span> <span class='id identifier rubyid_persistent?'>persistent?</span>
1614
1931
  <span class='ivar'>@persistent</span> <span class='op'>==</span> <span class='kw'>false</span> <span class='op'>||</span> <span class='ivar'>@persistent</span> <span class='op'>==</span> <span class='kw'>nil</span> <span class='op'>?</span> <span class='kw'>false</span> <span class='op'>:</span> <span class='kw'>true</span>
@@ -1645,12 +1962,12 @@ any string not already ending with one.</p>
1645
1962
  <pre class="lines">
1646
1963
 
1647
1964
 
1648
- 239
1649
- 240
1650
- 241</pre>
1965
+ 285
1966
+ 286
1967
+ 287</pre>
1651
1968
  </td>
1652
1969
  <td>
1653
- <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 239</span>
1970
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 285</span>
1654
1971
 
1655
1972
  <span class='kw'>def</span> <span class='id identifier rubyid_puts'>puts</span> <span class='op'>*</span><span class='id identifier rubyid_string'>string</span>
1656
1973
  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='id identifier rubyid_string'>string</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_s'>s</span><span class='op'>|</span> <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_chomp'>chomp</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span>
@@ -1661,9 +1978,91 @@ any string not already ending with one.</p>
1661
1978
  </div>
1662
1979
 
1663
1980
  <div class="method_details ">
1664
- <h3 class="signature " id="register_observer-instance_method">
1981
+ <h3 class="signature " id="register_error_handler-instance_method">
1665
1982
 
1666
- - (<tt>Object</tt>) <strong>register_observer</strong>(&amp;block)
1983
+ - (<tt>Block</tt>) <strong>register_error_handler</strong> {|Exception, self| ... }
1984
+
1985
+
1986
+
1987
+ <span class="aliases">Also known as:
1988
+ <span class="names"><span id='on_error-instance_method'>on_error</span></span>
1989
+ </span>
1990
+
1991
+
1992
+
1993
+ </h3><div class="docstring">
1994
+ <div class="discussion">
1995
+
1996
+ <p>Register a block to be called when <span class='object_link'><a href="Extension/IO.html#run_match-instance_method" title="Ionian::Extension::IO#run_match (method)">Extension::IO#run_match</a></span> raises
1997
+ an error. Method callbacks can be registered with
1998
+ &amp;object.method(:method).</p>
1999
+
2000
+
2001
+ </div>
2002
+ </div>
2003
+ <div class="tags">
2004
+
2005
+ <p class="tag_title">Yields:</p>
2006
+ <ul class="yield">
2007
+
2008
+ <li>
2009
+
2010
+
2011
+ <span class='type'>(<tt>Exception</tt>, <tt>self</tt>)</span>
2012
+
2013
+
2014
+
2015
+ </li>
2016
+
2017
+ </ul>
2018
+ <p class="tag_title">Returns:</p>
2019
+ <ul class="return">
2020
+
2021
+ <li>
2022
+
2023
+
2024
+ <span class='type'>(<tt>Block</tt>)</span>
2025
+
2026
+
2027
+
2028
+ &mdash;
2029
+ <div class='inline'>
2030
+ <p>a reference to the given block.</p>
2031
+ </div>
2032
+
2033
+ </li>
2034
+
2035
+ </ul>
2036
+
2037
+ </div><table class="source_code">
2038
+ <tr>
2039
+ <td>
2040
+ <pre class="lines">
2041
+
2042
+
2043
+ 245
2044
+ 246
2045
+ 247
2046
+ 248
2047
+ 249</pre>
2048
+ </td>
2049
+ <td>
2050
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 245</span>
2051
+
2052
+ <span class='kw'>def</span> <span class='id identifier rubyid_register_error_handler'>register_error_handler</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
2053
+ <span class='ivar'>@ionian_error_handlers</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_block'>block</span> <span class='kw'>unless</span> <span class='ivar'>@ionian_error_handlers</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_block'>block</span>
2054
+ <span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_register_error_handler'>register_error_handler</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span> <span class='kw'>if</span> <span class='ivar'>@socket</span>
2055
+ <span class='id identifier rubyid_block'>block</span>
2056
+ <span class='kw'>end</span></pre>
2057
+ </td>
2058
+ </tr>
2059
+ </table>
2060
+ </div>
2061
+
2062
+ <div class="method_details ">
2063
+ <h3 class="signature " id="register_match_handler-instance_method">
2064
+
2065
+ - (<tt>Block</tt>) <strong>register_match_handler</strong> {|MatchData, self| ... }
1667
2066
 
1668
2067
 
1669
2068
 
@@ -1676,9 +2075,86 @@ any string not already ending with one.</p>
1676
2075
  </h3><div class="docstring">
1677
2076
  <div class="discussion">
1678
2077
 
1679
- <p>Register a block to be called when #run_match receives matched data. Method
1680
- callbacks can be registered with &amp;object.method(:method). Returns a
1681
- reference to the given block. block = ionian_socket.register_observer { … }</p>
2078
+ <p>Register a block to be called when <span class='object_link'><a href="Extension/IO.html#run_match-instance_method" title="Ionian::Extension::IO#run_match (method)">Extension::IO#run_match</a></span>
2079
+ receives matched data. Method callbacks can be registered with
2080
+ &amp;object.method(:method).</p>
2081
+
2082
+
2083
+ </div>
2084
+ </div>
2085
+ <div class="tags">
2086
+
2087
+ <p class="tag_title">Yields:</p>
2088
+ <ul class="yield">
2089
+
2090
+ <li>
2091
+
2092
+
2093
+ <span class='type'>(<tt>MatchData</tt>, <tt>self</tt>)</span>
2094
+
2095
+
2096
+
2097
+ </li>
2098
+
2099
+ </ul>
2100
+ <p class="tag_title">Returns:</p>
2101
+ <ul class="return">
2102
+
2103
+ <li>
2104
+
2105
+
2106
+ <span class='type'>(<tt>Block</tt>)</span>
2107
+
2108
+
2109
+
2110
+ &mdash;
2111
+ <div class='inline'>
2112
+ <p>The given block.</p>
2113
+ </div>
2114
+
2115
+ </li>
2116
+
2117
+ </ul>
2118
+
2119
+ </div><table class="source_code">
2120
+ <tr>
2121
+ <td>
2122
+ <pre class="lines">
2123
+
2124
+
2125
+ 213
2126
+ 214
2127
+ 215
2128
+ 216
2129
+ 217</pre>
2130
+ </td>
2131
+ <td>
2132
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 213</span>
2133
+
2134
+ <span class='kw'>def</span> <span class='id identifier rubyid_register_match_handler'>register_match_handler</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
2135
+ <span class='ivar'>@ionian_match_handlers</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_block'>block</span> <span class='kw'>unless</span> <span class='ivar'>@ionian_match_handlers</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_block'>block</span>
2136
+ <span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_register_match_handler'>register_match_handler</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span> <span class='kw'>if</span> <span class='ivar'>@socket</span>
2137
+ <span class='id identifier rubyid_block'>block</span>
2138
+ <span class='kw'>end</span></pre>
2139
+ </td>
2140
+ </tr>
2141
+ </table>
2142
+ </div>
2143
+
2144
+ <div class="method_details ">
2145
+ <h3 class="signature " id="register_observer-instance_method">
2146
+
2147
+ - (<tt>Object</tt>) <strong>register_observer</strong>(&amp;block)
2148
+
2149
+
2150
+
2151
+
2152
+
2153
+ </h3><div class="docstring">
2154
+ <div class="discussion">
2155
+ <div class="note deprecated"><strong>Deprecated.</strong> <div class='inline'>
2156
+ <p>Use <span class='object_link'><a href="#register_match_handler-instance_method" title="Ionian::Socket#register_match_handler (method)">#register_match_handler</a></span> instead.</p>
2157
+ </div></div>
1682
2158
 
1683
2159
 
1684
2160
  </div>
@@ -1692,18 +2168,62 @@ reference to the given block. block = ionian_socket.register_observer { … }</p
1692
2168
  <pre class="lines">
1693
2169
 
1694
2170
 
1695
- 199
1696
- 200
1697
- 201
1698
- 202
1699
- 203</pre>
2171
+ 222
2172
+ 223
2173
+ 224
2174
+ 225</pre>
1700
2175
  </td>
1701
2176
  <td>
1702
- <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 199</span>
2177
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 222</span>
1703
2178
 
1704
2179
  <span class='kw'>def</span> <span class='id identifier rubyid_register_observer'>register_observer</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
1705
- <span class='ivar'>@ionian_listeners</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_block'>block</span> <span class='kw'>unless</span> <span class='ivar'>@ionian_listeners</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_block'>block</span>
1706
- <span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_register_observer'>register_observer</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span> <span class='kw'>if</span> <span class='ivar'>@socket</span>
2180
+ <span class='const'>STDOUT</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>WARN: Call to deprecated method </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid___method__'>__method__</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
2181
+ <span class='id identifier rubyid_register_match_handler'>register_match_handler</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
2182
+ <span class='kw'>end</span></pre>
2183
+ </td>
2184
+ </tr>
2185
+ </table>
2186
+ </div>
2187
+
2188
+ <div class="method_details ">
2189
+ <h3 class="signature " id="unregister_error_handler-instance_method">
2190
+
2191
+ - (<tt>Object</tt>) <strong>unregister_error_handler</strong>(&amp;block)
2192
+
2193
+
2194
+
2195
+
2196
+
2197
+ </h3><div class="docstring">
2198
+ <div class="discussion">
2199
+
2200
+ <p>Unregister a block from being called when a IO#run_match error is
2201
+ raised.</p>
2202
+
2203
+
2204
+ </div>
2205
+ </div>
2206
+ <div class="tags">
2207
+
2208
+
2209
+ </div><table class="source_code">
2210
+ <tr>
2211
+ <td>
2212
+ <pre class="lines">
2213
+
2214
+
2215
+ 255
2216
+ 256
2217
+ 257
2218
+ 258
2219
+ 259</pre>
2220
+ </td>
2221
+ <td>
2222
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 255</span>
2223
+
2224
+ <span class='kw'>def</span> <span class='id identifier rubyid_unregister_error_handler'>unregister_error_handler</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
2225
+ <span class='ivar'>@ionian_error_handlers</span><span class='period'>.</span><span class='id identifier rubyid_delete_if'>delete_if</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_o'>o</span><span class='op'>|</span> <span class='id identifier rubyid_o'>o</span> <span class='op'>==</span> <span class='id identifier rubyid_block'>block</span> <span class='rbrace'>}</span>
2226
+ <span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_unregister_error_handler'>unregister_error_handler</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span> <span class='kw'>if</span> <span class='ivar'>@socket</span>
1707
2227
  <span class='id identifier rubyid_block'>block</span>
1708
2228
  <span class='kw'>end</span></pre>
1709
2229
  </td>
@@ -1712,9 +2232,9 @@ reference to the given block. block = ionian_socket.register_observer { … }</p
1712
2232
  </div>
1713
2233
 
1714
2234
  <div class="method_details ">
1715
- <h3 class="signature " id="unregister_observer-instance_method">
2235
+ <h3 class="signature " id="unregister_match_handler-instance_method">
1716
2236
 
1717
- - (<tt>Object</tt>) <strong>unregister_observer</strong>(&amp;block)
2237
+ - (<tt>Object</tt>) <strong>unregister_match_handler</strong>(&amp;block)
1718
2238
 
1719
2239
 
1720
2240
 
@@ -1737,29 +2257,73 @@ reference to the given block. block = ionian_socket.register_observer { … }</p
1737
2257
  <pre class="lines">
1738
2258
 
1739
2259
 
1740
- 208
1741
- 209
1742
- 210
1743
- 211
1744
- 212</pre>
2260
+ 228
2261
+ 229
2262
+ 230
2263
+ 231
2264
+ 232</pre>
1745
2265
  </td>
1746
2266
  <td>
1747
- <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 208</span>
2267
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 228</span>
1748
2268
 
1749
- <span class='kw'>def</span> <span class='id identifier rubyid_unregister_observer'>unregister_observer</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
1750
- <span class='ivar'>@ionian_listeners</span><span class='period'>.</span><span class='id identifier rubyid_delete_if'>delete_if</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_o'>o</span><span class='op'>|</span> <span class='id identifier rubyid_o'>o</span> <span class='op'>==</span> <span class='id identifier rubyid_block'>block</span> <span class='rbrace'>}</span>
1751
- <span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_unregister_observer'>unregister_observer</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span> <span class='kw'>if</span> <span class='ivar'>@socket</span>
2269
+ <span class='kw'>def</span> <span class='id identifier rubyid_unregister_match_handler'>unregister_match_handler</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
2270
+ <span class='ivar'>@ionian_match_handlers</span><span class='period'>.</span><span class='id identifier rubyid_delete_if'>delete_if</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_o'>o</span><span class='op'>|</span> <span class='id identifier rubyid_o'>o</span> <span class='op'>==</span> <span class='id identifier rubyid_block'>block</span> <span class='rbrace'>}</span>
2271
+ <span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_unregister_match_handler'>unregister_match_handler</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span> <span class='kw'>if</span> <span class='ivar'>@socket</span>
1752
2272
  <span class='id identifier rubyid_block'>block</span>
1753
2273
  <span class='kw'>end</span></pre>
1754
2274
  </td>
1755
2275
  </tr>
1756
2276
  </table>
2277
+ </div>
2278
+
2279
+ <div class="method_details ">
2280
+ <h3 class="signature " id="unregister_observer-instance_method">
2281
+
2282
+ - (<tt>Object</tt>) <strong>unregister_observer</strong>(&amp;block)
2283
+
2284
+
2285
+
2286
+
2287
+
2288
+ </h3><div class="docstring">
2289
+ <div class="discussion">
2290
+ <div class="note deprecated"><strong>Deprecated.</strong> <div class='inline'>
2291
+ <p>Use <span class='object_link'><a href="#unregister_match_handler-instance_method" title="Ionian::Socket#unregister_match_handler (method)">#unregister_match_handler</a></span> instead.</p>
2292
+ </div></div>
2293
+
2294
+
2295
+ </div>
2296
+ </div>
2297
+ <div class="tags">
2298
+
2299
+
2300
+ </div><table class="source_code">
2301
+ <tr>
2302
+ <td>
2303
+ <pre class="lines">
2304
+
2305
+
2306
+ 235
2307
+ 236
2308
+ 237
2309
+ 238</pre>
2310
+ </td>
2311
+ <td>
2312
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 235</span>
2313
+
2314
+ <span class='kw'>def</span> <span class='id identifier rubyid_unregister_observer'>unregister_observer</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
2315
+ <span class='const'>STDOUT</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>WARN: Call to deprecated method </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid___method__'>__method__</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
2316
+ <span class='id identifier rubyid_unregister_match_handler'>unregister_match_handler</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
2317
+ <span class='kw'>end</span></pre>
2318
+ </td>
2319
+ </tr>
2320
+ </table>
1757
2321
  </div>
1758
2322
 
1759
2323
  <div class="method_details ">
1760
2324
  <h3 class="signature " id="write-instance_method">
1761
2325
 
1762
- - (<tt>Object</tt>) <strong>write</strong>(string)
2326
+ - (<tt>Fixnum</tt>) <strong>write</strong>(string)
1763
2327
 
1764
2328
 
1765
2329
 
@@ -1772,13 +2336,31 @@ reference to the given block. block = ionian_socket.register_observer { … }</p
1772
2336
  </h3><div class="docstring">
1773
2337
  <div class="discussion">
1774
2338
 
1775
- <p>Writes the given string to the socket. Returns the number of bytes written.</p>
2339
+ <p>Writes the given string to the socket.</p>
1776
2340
 
1777
2341
 
1778
2342
  </div>
1779
2343
  </div>
1780
2344
  <div class="tags">
1781
2345
 
2346
+ <p class="tag_title">Returns:</p>
2347
+ <ul class="return">
2348
+
2349
+ <li>
2350
+
2351
+
2352
+ <span class='type'>(<tt>Fixnum</tt>)</span>
2353
+
2354
+
2355
+
2356
+ &mdash;
2357
+ <div class='inline'>
2358
+ <p>Number of bytes written.</p>
2359
+ </div>
2360
+
2361
+ </li>
2362
+
2363
+ </ul>
1782
2364
 
1783
2365
  </div><table class="source_code">
1784
2366
  <tr>
@@ -1786,36 +2368,36 @@ reference to the given block. block = ionian_socket.register_observer { … }</p
1786
2368
  <pre class="lines">
1787
2369
 
1788
2370
 
1789
- 245
1790
- 246
1791
- 247
1792
- 248
1793
- 249
1794
- 250
1795
- 251
1796
- 252
1797
- 253
1798
- 254
1799
- 255
1800
- 256
1801
- 257
1802
- 258
1803
- 259
1804
- 260
1805
- 261
1806
- 262
1807
- 263
1808
- 264
1809
- 265
1810
- 266
1811
- 267
1812
- 268
1813
- 269
1814
- 270
1815
- 271</pre>
2371
+ 291
2372
+ 292
2373
+ 293
2374
+ 294
2375
+ 295
2376
+ 296
2377
+ 297
2378
+ 298
2379
+ 299
2380
+ 300
2381
+ 301
2382
+ 302
2383
+ 303
2384
+ 304
2385
+ 305
2386
+ 306
2387
+ 307
2388
+ 308
2389
+ 309
2390
+ 310
2391
+ 311
2392
+ 312
2393
+ 313
2394
+ 314
2395
+ 315
2396
+ 316
2397
+ 317</pre>
1816
2398
  </td>
1817
2399
  <td>
1818
- <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 245</span>
2400
+ <pre class="code"><span class="info file"># File 'lib/ionian/socket.rb', line 291</span>
1819
2401
 
1820
2402
  <span class='kw'>def</span> <span class='id identifier rubyid_write'>write</span> <span class='id identifier rubyid_string'>string</span>
1821
2403
  <span class='id identifier rubyid_create_socket'>create_socket</span> <span class='kw'>unless</span> <span class='ivar'>@persistent</span>
@@ -1854,7 +2436,7 @@ reference to the given block. block = ionian_socket.register_observer { … }</p
1854
2436
  </div>
1855
2437
 
1856
2438
  <div id="footer">
1857
- Generated on Mon Jan 26 21:45:48 2015 by
2439
+ Generated on Wed Jan 28 16:07:21 2015 by
1858
2440
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1859
2441
  0.8.7.6 (ruby-2.1.5).
1860
2442
  </div>