/usr/share/GNUstep/Documentation/Developer/Base/Reference/NSConnection.html is in gnustep-base-doc 1.25.1-2ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>NSConnection class reference</title>
</head>
<body>
<font face="serif">
<a href="Base.html">Up</a>
<br />
<h1><a name="title$NSConnection">NSConnection class reference</a></h1>
<h3>Authors</h3>
<dl>
<dt>Andrew Kachites McCallum (<a href="mailto:mccallum@gnu.ai.mit.edu"><code>mccallum@gnu.ai.mit.edu</code></a>)</dt>
<dd>
</dd>
<dt>Richard Frith-Macdonald (<a href="mailto:rfm@gnu.org"><code>rfm@gnu.org</code></a>)</dt>
<dd>
</dd>
</dl>
<p><b>Copyright:</b> (C) 1994-2017 Free Software Foundation, Inc.</p>
<div>
<hr width="50%" align="left" />
<h3>Contents -</h3>
<ol>
<li>
<a href="#001000000000">Software documentation for the NSConnection class</a>
</li>
<li>
<a href="#002000000000">Software documentation for the
NSObject(NSConnectionDelegate)
informal protocol</a>
</li>
</ol>
<hr width="50%" align="left" />
</div>
<h1><a name="001000000000">
Software documentation for the NSConnection class
</a></h1>
<h2><a name="class$NSConnection">NSConnection</a> : <a rel="gsdoc" href="NSObject.html#class$NSObject">NSObject</a></h2>
<blockquote class="declared">
<dl>
<dt><b>Declared in:</b></dt>
<dd>Foundation/NSConnection.h</dd>
</dl>
</blockquote>
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
NSConnection objects are used to manage
communications between objects in different
processes, in different machines, or in different
threads.
</div>
<b>Method summary</b>
<ul>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection+allConnections">+allConnections</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection+connectionWithReceivePort$sendPort$">+connectionWithReceivePort:sendPort:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection+connectionWithRegisteredName$host$">+connectionWithRegisteredName:host:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection+connectionWithRegisteredName$host$usingNameServer$">+connectionWithRegisteredName:host:usingNameServer:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection+currentConversation">+currentConversation</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection+defaultConnection">+defaultConnection</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection+rootProxyForConnectionWithRegisteredName$host$">+rootProxyForConnectionWithRegisteredName:host:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection+rootProxyForConnectionWithRegisteredName$host$usingNameServer$">+rootProxyForConnectionWithRegisteredName:host:usingNameServer:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection+serviceConnectionWithName$rootObject$">+serviceConnectionWithName:rootObject:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection+serviceConnectionWithName$rootObject$usingNameServer$">+serviceConnectionWithName:rootObject:usingNameServer:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-addRequestMode$">-addRequestMode:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-addRunLoop$">-addRunLoop:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-delegate">-delegate</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-enableMultipleThreads">-enableMultipleThreads</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-independentConversationQueueing">-independentConversationQueueing</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-initWithReceivePort$sendPort$">-initWithReceivePort:sendPort:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-invalidate">-invalidate</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-isValid">-isValid</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-localObjects">-localObjects</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-multipleThreadsEnabled">-multipleThreadsEnabled</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-receivePort">-receivePort</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-registerName$">-registerName:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-registerName$withNameServer$">-registerName:withNameServer:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-remoteObjects">-remoteObjects</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-removeRequestMode$">-removeRequestMode:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-removeRunLoop$">-removeRunLoop:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-replyTimeout">-replyTimeout</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-requestModes">-requestModes</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-requestTimeout">-requestTimeout</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-rootObject">-rootObject</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-rootProxy">-rootProxy</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-runInNewThread">-runInNewThread</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-sendPort">-sendPort</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-setDelegate$">-setDelegate:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-setIndependentConversationQueueing$">-setIndependentConversationQueueing:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-setReplyTimeout$">-setReplyTimeout:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-setRequestMode$">-setRequestMode:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-setRequestTimeout$">-setRequestTimeout:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-setRootObject$">-setRootObject:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSConnection-statistics">-statistics</a></li>
</ul>
<hr width="50%" align="left" />
<div class="method">
<h3><a name="method$NSConnection+allConnections">allConnections </a></h3>
+ (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*) <b>allConnections</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns an array containing all the NSConnection
objects known to the system. These connections will
be valid at the time that the array was created, but may
be invalidated by other threads before you get to
examine the array.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection+connectionWithReceivePort$sendPort$">connectionWithReceivePort: sendPort: </a></h3>
+ (<a rel="gsdoc" href="#class$NSConnection">NSConnection</a>*) <b>connectionWithReceivePort:</b> (<a rel="gsdoc" href="NSPort.html#class$NSPort">NSPort</a>*)r<b> sendPort:</b> (<a rel="gsdoc" href="NSPort.html#class$NSPort">NSPort</a>*)s;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns a connection initialised using
<a rel="gsdoc" href="#method$NSConnection-initWithReceivePort$sendPort$">
-initWithReceivePort:sendPort:
</a>
<br /> Both ports must be of the same type.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection+connectionWithRegisteredName$host$">connectionWithRegisteredName: host: </a></h3>
+ (<a rel="gsdoc" href="#class$NSConnection">NSConnection</a>*) <b>connectionWithRegisteredName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)n<b> host:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)h;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
</p>
<p>
Returns an NSConnection object whose send port is
that of the NSConnection registered under the name
<var>n</var> on the host <var>h</var>
</p>
<p>
</p>
<p>
This method calls
<a rel="gsdoc" href="#method$NSConnection+connectionWithRegisteredName$host$usingNameServer$">+connectionWithRegisteredName:host:usingNameServer:</a>
using the default system name server.
</p>
<p>
</p>
<p>
Use
<a rel="gsdoc" href="NSPortNameServer.html#class$NSSocketPortNameServer">NSSocketPortNameServer</a>
for connections to remote hosts. </p>
<p>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection+connectionWithRegisteredName$host$usingNameServer$">connectionWithRegisteredName: host: usingNameServer: </a></h3>
+ (<a rel="gsdoc" href="#class$NSConnection">NSConnection</a>*) <b>connectionWithRegisteredName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)n<b> host:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)h<b> usingNameServer:</b> (<a rel="gsdoc" href="NSPortNameServer.html#class$NSPortNameServer">NSPortNameServer</a>*)s;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
</p>
<p>
Returns an NSConnection object whose send port is
that of the NSConnection registered under
<em>name</em> on <em>host</em>.
</p>
<p>
</p>
<p>
The nameserver <em>server</em> is used to look up the
send port to be used for the connection. <br /> Use
<a rel="gsdoc" href="NSPortNameServer.html#method$NSSocketPortNameServer+sharedInstance">[NSSocketPortNameServer +sharedInstance]</a>
for connections to remote hosts.
</p>
<p>
</p>
<p>
If <em>host</em> is <code>nil</code> or an empty
string, the host is taken to be the local
machine. <br /> If it is an asterisk ('*') then
the nameserver checks all hosts on the local subnet
(unless the nameserver is one that only manages
local ports). <br /> In the GNUstep implementation,
the local host is searched before any other hosts.
<br /> NB. if the nameserver does not support
connections to remote hosts (the default
situation) the host argeument should be
omitted.
</p>
<p>
</p>
<p>
If no NSConnection can be found for <em>name</em> and
<em>host</em> host, the method returns
<code>nil</code>.
</p>
<p>
</p>
<p>
The returned object has the default NSConnection of
the current thread as its parent (it has the same
receive port as the default connection).
</p>
<p>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection+currentConversation">currentConversation </a></h3>
+ (id) <b>currentConversation</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Return the current conversation... not implemented
in GNUstep
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection+defaultConnection">defaultConnection </a></h3>
+ (<a rel="gsdoc" href="#class$NSConnection">NSConnection</a>*) <b>defaultConnection</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns the default connection for a thread. <br />
Creates a new instance if necessary. <br /> The
default connection has a single NSPort object used
for both sending and receiving - this it can't be used
to connect to a remote process, but can be used to vend
objects. <br /> Possible problem - if the
connection is invalidated, it won't be cleaned
up until this thread calls this method again. The
connection and it's ports could hang around for
a very <strong>long</strong> time.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection+rootProxyForConnectionWithRegisteredName$host$">rootProxyForConnectionWithRegisteredName: host: </a></h3>
+ (<a rel="gsdoc" href="NSDistantObject.html#class$NSDistantObject">NSDistantObject</a>*) <b>rootProxyForConnectionWithRegisteredName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)n<b> host:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)h;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
This method calls
<a rel="gsdoc" href="#method$NSConnection+rootProxyForConnectionWithRegisteredName$host$usingNameServer$">+rootProxyForConnectionWithRegisteredName:host:usingNameServer:</a>
to return a proxy for a root object on the remote connection with the send port registered under name <var>n</var> on host <var>h</var>.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection+rootProxyForConnectionWithRegisteredName$host$usingNameServer$">rootProxyForConnectionWithRegisteredName: host: usingNameServer: </a></h3>
+ (<a rel="gsdoc" href="NSDistantObject.html#class$NSDistantObject">NSDistantObject</a>*) <b>rootProxyForConnectionWithRegisteredName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)n<b> host:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)h<b> usingNameServer:</b> (<a rel="gsdoc" href="NSPortNameServer.html#class$NSPortNameServer">NSPortNameServer</a>*)s;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
This method calls
<a rel="gsdoc" href="#method$NSConnection+connectionWithRegisteredName$host$usingNameServer$">+connectionWithRegisteredName:host:usingNameServer:</a>
to get a connection, then sends it a <a rel="gsdoc" href="#method$NSConnection-rootProxy">-rootProxy</a>
message to get a proxy for the root object being vended by the remote connection. Returns the proxy or <code>nil</code> if it couldn't find a connection or if the root object for the connection has not been set. <br /> Use <a rel="gsdoc" href="NSPortNameServer.html#method$NSSocketPortNameServer+sharedInstance">[NSSocketPortNameServer +sharedInstance]</a>
for connections to remote hosts.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection+serviceConnectionWithName$rootObject$">serviceConnectionWithName: rootObject: </a></h3>
+ (id) <b>serviceConnectionWithName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)name<b> rootObject:</b> (id)root;<br />
<div class="availability">
<b>Availability:</b> MacOS-X 10.5.0</div>
<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection+serviceConnectionWithName$rootObject$usingNameServer$">serviceConnectionWithName: rootObject: usingNameServer: </a></h3>
+ (id) <b>serviceConnectionWithName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)name<b> rootObject:</b> (id)root<b> usingNameServer:</b> (<a rel="gsdoc" href="NSPortNameServer.html#class$NSPortNameServer">NSPortNameServer</a>*)server;<br />
<div class="availability">
<b>Availability:</b> MacOS-X 10.5.0</div>
<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-addRequestMode$">addRequestMode: </a></h3>
- (void) <b>addRequestMode:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)mode;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Adds <var>mode</var> to the run loop modes that the
NSConnection will listen to for incoming
messages.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-addRunLoop$">addRunLoop: </a></h3>
- (void) <b>addRunLoop:</b> (<a rel="gsdoc" href="NSRunLoop.html#class$NSRunLoop">NSRunLoop</a>*)loop;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Adds <var>loop</var> to the set of run loops that the
NSConnection will listen to for incoming
messages.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-delegate">delegate </a></h3>
- (id) <b>delegate</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns the delegate of the NSConnection.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-enableMultipleThreads">enableMultipleThreads </a></h3>
- (void) <b>enableMultipleThreads</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Sets the NSConnection configuration so that multiple
threads may use the connection to send requests to
the remote connection. <br /> This option is inherited
by child connections. <br /> NB. A connection with
multiple threads enabled will run slower than a
normal connection.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-independentConversationQueueing">independentConversationQueueing </a></h3>
- (BOOL) <b>independentConversationQueueing</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns <code>YES</code> if the NSConnection is
configured to handle remote messages atomically,
<code>NO</code> otherwise. <br /> This option is
inherited by child connections.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-initWithReceivePort$sendPort$">initWithReceivePort: sendPort: </a></h3>
- (id) <b>initWithReceivePort:</b> (<a rel="gsdoc" href="NSPort.html#class$NSPort">NSPort</a>*)r<b> sendPort:</b> (<a rel="gsdoc" href="NSPort.html#class$NSPort">NSPort</a>*)s;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
This is a designated initialiser for the class.<br />
<div class="desc">
Initialises an NSConnection with the receive
port <var>r</var> and the send port <var>s</var>.
<br /> Behavior varies with the port values as
follows -
<dl>
<dt><var>r</var> is <code>nil</code></dt>
<dd>
The NSConnection is released and the method returns
<code>nil</code>.
</dd>
<dt><var>s</var> is <code>nil</code></dt>
<dd>
The NSConnection uses <var>r</var> as the send port
as well as the receive port.
</dd>
<dt>
<var>s</var> is the same as <var>r</var>
</dt>
<dd>
The NSConnection is usable only for vending
objects.
</dd>
<dt>
A connection with the same ports exists
</dt>
<dd>
The new connection is released and the old
connection is retained and returned.
</dd>
<dt>
A connection with the same ports (swapped) exists
</dt>
<dd>
The new connection is initialised as normal, and
will communicate with the old connection.
</dd>
</dl>
</p>
<p>
If a connection exists whose send and receive ports
are both the same as the new connections receive
port, that existing connection is deemed to be the
parent of the new connection. The new connection
inherits configuration information from the
parent, and the delegate of the parent has a
chance to adjust the configuration of the new
connection or veto its creation. <br />
NSConnectionDidInitializeNotification
is posted once a new connection is initialised.
</p>
<p>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-invalidate">invalidate </a></h3>
- (void) <b>invalidate</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Marks the receiving NSConnection as invalid. <br />
Removes the NSConnections ports from any run loops.
<br /> Posts an NSConnectionDidDieNotification.
<br /> Invalidates all remote objects and local
proxies.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-isValid">isValid </a></h3>
- (BOOL) <b>isValid</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns <code>YES</code> if the connection is
valid, <code>NO</code> otherwise. A connection is
valid until it has been sent an
<a rel="gsdoc" href="#method$NSConnection-invalidate">
-invalidate
</a>
message.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-localObjects">localObjects </a></h3>
- (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*) <b>localObjects</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns an array of all the local objects that have
proxies at the remote end of the connection because
they have been sent over the connection and not yet
released by the far end.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-multipleThreadsEnabled">multipleThreadsEnabled </a></h3>
- (BOOL) <b>multipleThreadsEnabled</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns <code>YES</code> if the connection permits
multiple threads to use it to send requests,
<code>NO</code> otherwise. <br /> See the
<a rel="gsdoc" href="#method$NSConnection-enableMultipleThreads">
-enableMultipleThreads
</a>
method.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-receivePort">receivePort </a></h3>
- (<a rel="gsdoc" href="NSPort.html#class$NSPort">NSPort</a>*) <b>receivePort</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns the NSPort object on which incoming
messages are received.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-registerName$">registerName: </a></h3>
- (BOOL) <b>registerName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)name;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Simply invokes
<a rel="gsdoc" href="#method$NSConnection-registerName$withNameServer$">
-registerName:withNameServer:
</a>
passing it the default system nameserver.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-registerName$withNameServer$">registerName: withNameServer: </a></h3>
- (BOOL) <b>registerName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)name<b> withNameServer:</b> (<a rel="gsdoc" href="NSPortNameServer.html#class$NSPortNameServer">NSPortNameServer</a>*)svr;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Registers the receive port of the NSConnection as
<var>name</var> and unregisters the previous value
(if any). <br /> Returns <code>YES</code> on success,
<code>NO</code> on failure. <br /> On failure, the
connection remains registered under the previous
<var>name</var>. <br /> Supply <code>nil</code> as
<var>name</var> to unregister the NSConnection.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-remoteObjects">remoteObjects </a></h3>
- (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*) <b>remoteObjects</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns an array of proxies to all the remote
objects known to the NSConnection.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-removeRequestMode$">removeRequestMode: </a></h3>
- (void) <b>removeRequestMode:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)mode;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Removes <var>mode</var> from the run loop modes
used to receive incoming messages.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-removeRunLoop$">removeRunLoop: </a></h3>
- (void) <b>removeRunLoop:</b> (<a rel="gsdoc" href="NSRunLoop.html#class$NSRunLoop">NSRunLoop</a>*)loop;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Removes <var>loop</var> from the run loops used to
receive incoming messages.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-replyTimeout">replyTimeout </a></h3>
- (<a rel="gsdoc" href="TypesAndConstants.html#type$NSTimeInterval">NSTimeInterval</a>) <b>replyTimeout</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns the timeout interval used when waiting for
a reply to a request sent on the NSConnection. This value
is inherited from the parent connection or may be set
using the
<a rel="gsdoc" href="#method$NSConnection-setReplyTimeout$">
-setReplyTimeout:
</a>
method. <br /> The default value is the maximum
delay (effectively infinite).
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-requestModes">requestModes </a></h3>
- (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*) <b>requestModes</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns an array of all the run loop modes that the
NSConnection uses when waiting for an incoming
request.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-requestTimeout">requestTimeout </a></h3>
- (<a rel="gsdoc" href="TypesAndConstants.html#type$NSTimeInterval">NSTimeInterval</a>) <b>requestTimeout</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns the timeout interval used when trying to
send a request on the NSConnection. This value is
inherited from the parent connection or may be
set using the
<a rel="gsdoc" href="#method$NSConnection-setRequestTimeout$">
-setRequestTimeout:
</a>
method. <br /> The default value is the maximum
delay (effectively infinite).
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-rootObject">rootObject </a></h3>
- (id) <b>rootObject</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns the object that is made available by this
connection or by its parent (the object is
associated with the receive port). <br />
Returns <code>nil</code> if no root object has been
set.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-rootProxy">rootProxy </a></h3>
- (<a rel="gsdoc" href="NSDistantObject.html#class$NSDistantObject">NSDistantObject</a>*) <b>rootProxy</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns the proxy for the root object of the remote
NSConnection. <br /> Generally you will wish
to call
<a rel="gsdoc" href="NSDistantObject.html#method$NSDistantObject-setProtocolForProxy$">[NSDistantObject -setProtocolForProxy:]</a>
immediately after obtaining such a root proxy.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-runInNewThread">runInNewThread </a></h3>
- (void) <b>runInNewThread</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Removes the NSConnection from the current threads
default run loop, then creates a new thread and
runs the NSConnection in it.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-sendPort">sendPort </a></h3>
- (<a rel="gsdoc" href="NSPort.html#class$NSPort">NSPort</a>*) <b>sendPort</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns the port on which the NSConnection sends
messages.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-setDelegate$">setDelegate: </a></h3>
- (void) <b>setDelegate:</b> (id)anObj;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Sets the NSConnection's delegate (without retaining
it). <br /> The delegate is able to control some of
the NSConnection's behavior by implementing methods in
an informal protocol.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-setIndependentConversationQueueing$">setIndependentConversationQueueing: </a></h3>
- (void) <b>setIndependentConversationQueueing:</b> (BOOL)flag;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Sets whether or not the NSConnection should handle
requests arriving from the remote NSConnection
atomically. <br /> By default, this is set to
<code>NO</code>... if set to <code>YES</code> then
any messages arriving while one message is being dealt
with, will be queued. <br /> NB. careful - use of
this option can cause deadlocks.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-setReplyTimeout$">setReplyTimeout: </a></h3>
- (void) <b>setReplyTimeout:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSTimeInterval">NSTimeInterval</a>)to;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Sets the time interval that the NSConnection will wait
for a reply for one of its requests before raising an
NSPortTimeoutException. <br /> NB.
In GNUstep you may also get such an exception if the
connection becomes invalidated while waiting for
a reply <var>to</var> a request.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-setRequestMode$">setRequestMode: </a></h3>
- (void) <b>setRequestMode:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)mode;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Sets the runloop <var>mode</var> in which requests
will be sent to the remote end of the connection.
Normally this is NSDefaultRunloopMode
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-setRequestTimeout$">setRequestTimeout: </a></h3>
- (void) <b>setRequestTimeout:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSTimeInterval">NSTimeInterval</a>)to;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Sets the time interval that the NSConnection will wait
<var>to</var> send one of its requests before raising
an NSPortTimeoutException.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-setRootObject$">setRootObject: </a></h3>
- (void) <b>setRootObject:</b> (id)anObj;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Sets the root object that is vended by the connection.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSConnection-statistics">statistics </a></h3>
- (<a rel="gsdoc" href="NSDictionary.html#class$NSDictionary">NSDictionary</a>*) <b>statistics</b>;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
Returns an object containing various statistics for
the NSConnection. <br /> On GNUstep the dictionary
contains -
<dl>
<dt>NSConnectionRepliesReceived</dt>
<dd>
The number of messages replied to by the remote
NSConnection.
</dd>
<dt>NSConnectionRepliesSent</dt>
<dd>
The number of replies sent to the remote
NSConnection.
</dd>
<dt>NSConnectionRequestsReceived</dt>
<dd>
The number of messages received from the remote
NSConnection.
</dd>
<dt>NSConnectionRequestsSent</dt>
<dd>
The number of messages sent to the remote
NSConnection.
</dd>
<dt>NSConnectionLocalCount</dt>
<dd>
The number of local objects currently vended.
</dd>
<dt>NSConnectionProxyCount</dt>
<dd>
The number of remote objects currently in use.
</dd>
</dl>
</div>
<hr width="25%" align="left" />
</div>
<h1><a name="002000000000">
Software documentation for the
NSObject(NSConnectionDelegate)
informal protocol
</a></h1>
<h2><a rel="gsdoc" href="NSObject.html#class$NSObject">NSObject</a>(<a name="category$NSObject(NSConnectionDelegate)">NSConnectionDelegate</a>)</h2>
<blockquote class="declared">
<dl>
<dt><b>Declared in:</b></dt>
<dd>Foundation/NSConnection.h</dd>
</dl>
</blockquote>
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
This category represents an informal protocol to which
NSConnection delegates may conform... These
methods are not actually implemented by NSObject, so
implementing these methods in your class has the
effect documented.
</div>
<b>Method summary</b>
<ul>
<li><a rel="gsdoc" href="NSConnection.html#method$NSObject(NSConnectionDelegate)-authenticateComponents$withData$">-authenticateComponents:withData:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSObject(NSConnectionDelegate)-authenticationDataForComponents$">-authenticationDataForComponents:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSObject(NSConnectionDelegate)-connection$didConnect$">-connection:didConnect:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSObject(NSConnectionDelegate)-connection$shouldMakeNewConnection$">-connection:shouldMakeNewConnection:</a></li>
<li><a rel="gsdoc" href="NSConnection.html#method$NSObject(NSConnectionDelegate)-makeNewConnection$sender$">-makeNewConnection:sender:</a></li>
</ul>
<hr width="50%" align="left" />
<div class="method">
<h3><a name="method$NSObject(NSConnectionDelegate)-authenticateComponents$withData$">authenticateComponents: withData: </a></h3>
- (BOOL) <b>authenticateComponents:</b> (<a rel="gsdoc" href="NSArray.html#class$NSMutableArray">NSMutableArray</a>*)components<b> withData:</b> (<a rel="gsdoc" href="NSData.html#class$NSData">NSData</a>*)authenticationData;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
</p>
<p>
This is not an NSConnection method, but is a method
that may be implemented by the delegate of an
NSConnection object.
</p>
<p>
</p>
<p>
If the delegate implements this method, the
NSConnection will invoke the method for
every message request or reply it receives from the
remote NSConnection. The delegate should use the
authentication data to check all the
NSData objects in the <var>components</var> array
(ignoring NSPort objects), and return
<code>YES</code> if they are valid,
<code>NO</code> otherwise.
</p>
<p>
</p>
<p>
If the method returns <code>NO</code> then an
NSFailedAuthentication exception
will be raised.
</p>
<p>
</p>
<p>
In GNUstep the <var>components</var> array is mutable,
allowing you to replace the NSData objects with
your own version.
</p>
<p>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSObject(NSConnectionDelegate)-authenticationDataForComponents$">authenticationDataForComponents: </a></h3>
- (<a rel="gsdoc" href="NSData.html#class$NSData">NSData</a>*) <b>authenticationDataForComponents:</b> (<a rel="gsdoc" href="NSArray.html#class$NSMutableArray">NSMutableArray</a>*)components;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
</p>
<p>
This is not an NSConnection method, but is a method
that may be implemented by the delegate of an
NSConnection object.
</p>
<p>
</p>
<p>
If the delegate implements this method, the
NSConnection will invoke the method for
every message request to reply it sends to the
remote NSConnection. The delegate should generate
authentication data by examining all the
NSData objects in the <var>components</var> array
(ignoring NSPort objects), and return the
authentication data that can be used by
the remote NSConnection.
</p>
<p>
</p>
<p>
If the method returns <code>nil</code> then an
NSGenericException exception will be
raised.
</p>
<p>
</p>
<p>
In GNUstep the <var>components</var> array is mutable,
allowing you to replace the NSData objects with
your own version.
</p>
<p>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSObject(NSConnectionDelegate)-connection$didConnect$">connection: didConnect: </a></h3>
- (<a rel="gsdoc" href="#class$NSConnection">NSConnection</a>*) <b>connection:</b> (<a rel="gsdoc" href="#class$NSConnection">NSConnection</a>*)ancestorConn<b> didConnect:</b> (<a rel="gsdoc" href="#class$NSConnection">NSConnection</a>*)newConn;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSObject(NSConnectionDelegate)-connection$shouldMakeNewConnection$">connection: shouldMakeNewConnection: </a></h3>
- (BOOL) <b>connection:</b> (<a rel="gsdoc" href="#class$NSConnection">NSConnection</a>*)parent<b> shouldMakeNewConnection:</b> (<a rel="gsdoc" href="#class$NSConnection">NSConnection</a>*)newConnection;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
</p>
<p>
This is not an NSConnection method, but is a method
that may be implemented by the delegate of an
NSConnection object.
</p>
<p>
</p>
<p>
If the delegate implements this method, it will be
called whenever a new NSConnection is created that
has this NSConnection as its <var>parent</var>. The
delegate may take this opportunity to adjust the
configuration of the new connection and may
return a boolean value to tell the
<var>parent</var> whether the creation of the new
connection is to be permitted or not.
</p>
<p>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$NSObject(NSConnectionDelegate)-makeNewConnection$sender$">makeNewConnection: sender: </a></h3>
- (BOOL) <b>makeNewConnection:</b> (<a rel="gsdoc" href="#class$NSConnection">NSConnection</a>*)newConnection<b> sender:</b> (<a rel="gsdoc" href="#class$NSConnection">NSConnection</a>*)parent;<br />
<div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
<div class="desc">
An old fashioned synonym for
<a rel="gsdoc" href="#method$NSObject(NSConnectionDelegate)-connection$shouldMakeNewConnection$">-connection:shouldMakeNewConnection:</a>
- don't use this.
</div>
<hr width="25%" align="left" />
</div>
<br />
<a href="Base.html">Up</a>
</font>
</body>
</html>
|