1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>InspIRCd: ircd_connector class Reference</title>
<link href="inspircd.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.3 -->
<div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Compound List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Compound Members</a> | <a class="qindex" href="globals.html">File Members</a></div>
<h1>ircd_connector Class Reference</h1>Each connection has one or more of these each represents ONE outbound connection to another ircd so each inbound has multiple outbounds.
<a href="#_details">More...</a>
<p>
<code>#include <<a class="el" href="connection_8h-source.html">connection.h</a>></code>
<p>
Inheritance diagram for ircd_connector:<p><center><img src="classircd__connector__inherit__graph.gif" border="0" usemap="#ircd__connector__inherit__map" alt="Inheritance graph"></center>
<map name="ircd__connector__inherit__map">
<area href="classExtensible.html" shape="rect" coords="21,82,103,109" alt="">
<area href="classclassbase.html" shape="rect" coords="22,8,102,34" alt="">
</map>
<center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for ircd_connector:<p><center><img src="classircd__connector__coll__graph.gif" border="0" usemap="#ircd__connector__coll__map" alt="Collaboration graph"></center>
<map name="ircd__connector__coll__map">
<area href="classExtensible.html" shape="rect" coords="7,7,90,34" alt="">
</map>
<center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center><a href="classircd__connector-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a0">MakeOutboundConnection</a> (char *newhost, int newport)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create an outbound connection to a listening socket. </em> <a href="#a0"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::string </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a1">GetServerName</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the servername on this established connection. </em> <a href="#a1"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a2">SetServerName</a> (std::string serv)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the server name of this connection. </em> <a href="#a2"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a3">GetDescriptor</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the file descriptor associated with this connection. </em> <a href="#a3"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a4">SetDescriptor</a> (int <a class="el" href="classircd__connector.html#r1">fd</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the file descriptor for this connection. </em> <a href="#a4"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a5">GetState</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the state flags for this connection. </em> <a href="#a5"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a6">SetState</a> (int <a class="el" href="classircd__connector.html#r4">state</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the state flags for this connection. </em> <a href="#a6"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>char * </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a7">GetServerIP</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the ip address (not servername) associated with this connection. </em> <a href="#a7"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::string </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a8">GetDescription</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the server description of this connection. </em> <a href="#a8"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a9">SetDescription</a> (std::string desc)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the server description of this connection. </em> <a href="#a9"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a10">GetServerPort</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the port number being used for this connection If the connection is outbound this will be the remote port otherwise it will be the local port, so it can always be gautanteed as open at the address given in <a class="el" href="classircd__connector.html#a7">GetServerIP()</a>. </em> <a href="#a10"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a11">SetServerPort</a> (int p)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the port used by this connection. </em> <a href="#a11"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a12">SetHostAndPort</a> (char *newhost, int newport)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set both the host and the port in one operation for this connection. </em> <a href="#a12"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a13">CloseConnection</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Close the connection by calling close() on its file descriptor This function call updates no other data. </em> <a href="#a13"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a14">AddBuffer</a> (std::string a)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This method adds text to the ircd connection's buffer There is no limitation on how much text of what line width may be added to this buffer. </em> <a href="#a14"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a15">BufferIsComplete</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This method returns true if the buffer contains at least one carriage return character, e.g. </em> <a href="#a15"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a16">ClearBuffer</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This method clears the server's buffer by setting it to an empty string. </em> <a href="#a16"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::string </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a17">GetBuffer</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This method retrieves the first string from the tail end of the buffer and advances the tail end of the buffer past the returned string, in a similar manner to strtok(). </em> <a href="#a17"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a18">SetVersionString</a> (std::string newversion)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This method sets the version string of the remote server. </em> <a href="#a18"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::string </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#a19">GetVersionString</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This method returns the version string of the remote server. </em> <a href="#a19"></a><em><br><br></td></tr>
<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::string </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#o0">ircdbuffer</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">IRCD Buffer for input characters, holds as many lines as are pending - Note that the final line may not be complete and should only be read when there is a <br>
seperator. </em> <a href="#o0"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>char </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#o1">host</a> [MAXBUF]</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">When MakeOutboundConnection is called, these public members are filled with the details passed to the function, for future reference. </em> <a href="#o1"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#o2">port</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">When MakeOutboundConnection is called, these public members are filled with the details passed to the function, for future reference. </em> <a href="#o2"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< std::string > </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#o3">routes</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classServer.html">Server</a> names of servers that this server is linked to So for A->B->C, if this was the record for B it would contain A and C whilever both servers are connected to B. </em> <a href="#o3"></a><em><br><br></td></tr>
<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#d0">SetHostAddress</a> (char *<a class="el" href="classircd__connector.html#o1">host</a>, int <a class="el" href="classircd__connector.html#o2">port</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">PRIVATE function to set the host address and port to connect to. </em> <a href="#d0"></a><em><br><br></td></tr>
<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>sockaddr_in </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#r0">addr</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sockaddr of the outbound ip and port. </em> <a href="#r0"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#r1">fd</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">File descriptor of the connection. </em> <a href="#r1"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::string </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#r2">servername</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classServer.html">Server</a> name. </em> <a href="#r2"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::string </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#r3">description</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classServer.html">Server</a> 'GECOS'. </em> <a href="#r3"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>char </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#r4">state</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">State. </em> <a href="#r4"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::string </td><td class="memItemRight" valign=bottom><a class="el" href="classircd__connector.html#r5">version</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This string holds the ircd's version response. </em> <a href="#r5"></a><em><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Each connection has one or more of these each represents ONE outbound connection to another ircd so each inbound has multiple outbounds.
<p>
A listening socket that accepts server type connections is represented by one class serverrec. Class serverrec will instantiate several objects of type ircd_connector to represent each established connection, inbound or outbound. So, to determine all linked servers you must walk through all the serverrecs that the core defines, and in each one iterate through until you find connection(s) relating to the server you want information on. The core and module API provide functions for this.
<p>
<p>
Definition at line <a class="el" href="connection_8h-source.html#l00054">54</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.<hr><h2>Member Function Documentation</h2>
<a name="a14" doxytag="ircd_connector::AddBuffer"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void ircd_connector::AddBuffer </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">std::string </td>
<td class="mdname1" valign="top" nowrap> <em>a</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
This method adds text to the ircd connection's buffer There is no limitation on how much text of what line width may be added to this buffer.
<p>
It is the sending server's responsibility to ensure sent data is kept within reasonable quanities. </td>
</tr>
</table>
<a name="a15" doxytag="ircd_connector::BufferIsComplete"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> bool ircd_connector::BufferIsComplete </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
This method returns true if the buffer contains at least one carriage return character, e.g.
<p>
one line can be read from the buffer successfully. </td>
</tr>
</table>
<a name="a16" doxytag="ircd_connector::ClearBuffer"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void ircd_connector::ClearBuffer </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
This method clears the server's buffer by setting it to an empty string.
<p>
</td>
</tr>
</table>
<a name="a13" doxytag="ircd_connector::CloseConnection"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void ircd_connector::CloseConnection </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Close the connection by calling close() on its file descriptor This function call updates no other data.
<p>
</td>
</tr>
</table>
<a name="a17" doxytag="ircd_connector::GetBuffer"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> std::string ircd_connector::GetBuffer </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
This method retrieves the first string from the tail end of the buffer and advances the tail end of the buffer past the returned string, in a similar manner to strtok().
<p>
</td>
</tr>
</table>
<a name="a8" doxytag="ircd_connector::GetDescription"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> std::string ircd_connector::GetDescription </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Get the server description of this connection.
<p>
</td>
</tr>
</table>
<a name="a3" doxytag="ircd_connector::GetDescriptor"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> int ircd_connector::GetDescriptor </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Get the file descriptor associated with this connection.
<p>
</td>
</tr>
</table>
<a name="a7" doxytag="ircd_connector::GetServerIP"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> char* ircd_connector::GetServerIP </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Get the ip address (not servername) associated with this connection.
<p>
</td>
</tr>
</table>
<a name="a1" doxytag="ircd_connector::GetServerName"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> std::string ircd_connector::GetServerName </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Return the servername on this established connection.
<p>
</td>
</tr>
</table>
<a name="a10" doxytag="ircd_connector::GetServerPort"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> int ircd_connector::GetServerPort </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Get the port number being used for this connection If the connection is outbound this will be the remote port otherwise it will be the local port, so it can always be gautanteed as open at the address given in <a class="el" href="classircd__connector.html#a7">GetServerIP()</a>.
<p>
</td>
</tr>
</table>
<a name="a5" doxytag="ircd_connector::GetState"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> int ircd_connector::GetState </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Get the state flags for this connection.
<p>
</td>
</tr>
</table>
<a name="a19" doxytag="ircd_connector::GetVersionString"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> std::string ircd_connector::GetVersionString </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
This method returns the version string of the remote server.
<p>
If the server has no version string an empty string is returned. </td>
</tr>
</table>
<a name="a0" doxytag="ircd_connector::MakeOutboundConnection"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> bool ircd_connector::MakeOutboundConnection </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">char * </td>
<td class="mdname" nowrap> <em>newhost</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>newport</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Create an outbound connection to a listening socket.
<p>
</td>
</tr>
</table>
<a name="a9" doxytag="ircd_connector::SetDescription"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void ircd_connector::SetDescription </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">std::string </td>
<td class="mdname1" valign="top" nowrap> <em>desc</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Set the server description of this connection.
<p>
</td>
</tr>
</table>
<a name="a4" doxytag="ircd_connector::SetDescriptor"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void ircd_connector::SetDescriptor </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">int </td>
<td class="mdname1" valign="top" nowrap> <em>fd</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Set the file descriptor for this connection.
<p>
</td>
</tr>
</table>
<a name="d0" doxytag="ircd_connector::SetHostAddress"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> bool ircd_connector::SetHostAddress </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">char * </td>
<td class="mdname" nowrap> <em>host</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>port</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [private]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
PRIVATE function to set the host address and port to connect to.
<p>
</td>
</tr>
</table>
<a name="a12" doxytag="ircd_connector::SetHostAndPort"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> bool ircd_connector::SetHostAndPort </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">char * </td>
<td class="mdname" nowrap> <em>newhost</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>newport</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Set both the host and the port in one operation for this connection.
<p>
</td>
</tr>
</table>
<a name="a2" doxytag="ircd_connector::SetServerName"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void ircd_connector::SetServerName </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">std::string </td>
<td class="mdname1" valign="top" nowrap> <em>serv</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Set the server name of this connection.
<p>
</td>
</tr>
</table>
<a name="a11" doxytag="ircd_connector::SetServerPort"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void ircd_connector::SetServerPort </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">int </td>
<td class="mdname1" valign="top" nowrap> <em>p</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Set the port used by this connection.
<p>
</td>
</tr>
</table>
<a name="a6" doxytag="ircd_connector::SetState"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void ircd_connector::SetState </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">int </td>
<td class="mdname1" valign="top" nowrap> <em>state</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Set the state flags for this connection.
<p>
</td>
</tr>
</table>
<a name="a18" doxytag="ircd_connector::SetVersionString"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void ircd_connector::SetVersionString </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">std::string </td>
<td class="mdname1" valign="top" nowrap> <em>newversion</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
This method sets the version string of the remote server.
<p>
</td>
</tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a name="r0" doxytag="ircd_connector::addr"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> sockaddr_in <a class="el" href="classircd__connector.html#r0">ircd_connector::addr</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Sockaddr of the outbound ip and port.
<p>
<p>
Definition at line <a class="el" href="connection_8h-source.html#l00059">59</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. </td>
</tr>
</table>
<a name="r3" doxytag="ircd_connector::description"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> std::string <a class="el" href="classircd__connector.html#r3">ircd_connector::description</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<a class="el" href="classServer.html">Server</a> 'GECOS'.
<p>
<p>
Definition at line <a class="el" href="connection_8h-source.html#l00071">71</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. </td>
</tr>
</table>
<a name="r1" doxytag="ircd_connector::fd"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> int <a class="el" href="classircd__connector.html#r1">ircd_connector::fd</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
File descriptor of the connection.
<p>
<p>
Definition at line <a class="el" href="connection_8h-source.html#l00063">63</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. </td>
</tr>
</table>
<a name="o1" doxytag="ircd_connector::host"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> char <a class="el" href="classircd__connector.html#o1">ircd_connector::host</a>[MAXBUF]
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
When MakeOutboundConnection is called, these public members are filled with the details passed to the function, for future reference.
<p>
<p>
Definition at line <a class="el" href="connection_8h-source.html#l00099">99</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. </td>
</tr>
</table>
<a name="o0" doxytag="ircd_connector::ircdbuffer"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> std::string <a class="el" href="classircd__connector.html#o0">ircd_connector::ircdbuffer</a>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
IRCD Buffer for input characters, holds as many lines as are pending - Note that the final line may not be complete and should only be read when there is a <br>
seperator.
<p>
<p>
Definition at line <a class="el" href="connection_8h-source.html#l00092">92</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. </td>
</tr>
</table>
<a name="o2" doxytag="ircd_connector::port"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> int <a class="el" href="classircd__connector.html#o2">ircd_connector::port</a>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
When MakeOutboundConnection is called, these public members are filled with the details passed to the function, for future reference.
<p>
<p>
Definition at line <a class="el" href="connection_8h-source.html#l00105">105</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. </td>
</tr>
</table>
<a name="o3" doxytag="ircd_connector::routes"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> std::vector<std::string> <a class="el" href="classircd__connector.html#o3">ircd_connector::routes</a>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<a class="el" href="classServer.html">Server</a> names of servers that this server is linked to So for A->B->C, if this was the record for B it would contain A and C whilever both servers are connected to B.
<p>
<p>
Definition at line <a class="el" href="connection_8h-source.html#l00111">111</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. </td>
</tr>
</table>
<a name="r2" doxytag="ircd_connector::servername"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> std::string <a class="el" href="classircd__connector.html#r2">ircd_connector::servername</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<a class="el" href="classServer.html">Server</a> name.
<p>
<p>
Definition at line <a class="el" href="connection_8h-source.html#l00067">67</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. </td>
</tr>
</table>
<a name="r4" doxytag="ircd_connector::state"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> char <a class="el" href="classircd__connector.html#r4">ircd_connector::state</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
State.
<p>
STATE_NOAUTH_INBOUND, STATE_NOAUTH_OUTBOUND STATE_SYNC, STATE_DISCONNECTED, STATE_CONNECTED
<p>
Definition at line <a class="el" href="connection_8h-source.html#l00076">76</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. </td>
</tr>
</table>
<a name="r5" doxytag="ircd_connector::version"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> std::string <a class="el" href="classircd__connector.html#r5">ircd_connector::version</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
This string holds the ircd's version response.
<p>
<p>
Definition at line <a class="el" href="connection_8h-source.html#l00084">84</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="connection_8h-source.html">connection.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Fri May 13 01:59:49 2005 for InspIRCd by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
</a>1.3.3 </small></address>
</body>
</html>
|