/usr/share/GNUstep/Documentation/Developer/netclasses/NetTCP.html is in libnetclasses-dev 1.06.dfsg-7build1.
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 | <!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>NetTCP reference</title>
</head>
<body>
<font face="serif">
<a href="index.html">Up</a>
<br />
<h1><a name="title$NetTCP">NetTCP reference</a></h1>
<h3>Authors</h3>
<dl>
<dt><a href="http://www.aeruder.net">Andrew Ruder</a> (<a href="mailto:aeruder@ksu.edu"><code>aeruder@ksu.edu</code></a>)</dt>
<dd>
</dd>
</dl>
<p><b>Version:</b> Revision 1</p>
<p><b>Date:</b> November 8, 2003</p>
<p><b>Copyright:</b> (C) Andrew Ruder</p>
<div>
<hr width="50%" align="left" />
<h3>Contents -</h3>
<ol>
<li>
<a href="#001000000000">Software documentation for the TCPConnecting class</a>
</li>
<li>
<a href="#002000000000">Software documentation for the TCPPort class</a>
</li>
<li>
<a href="#003000000000">Software documentation for the TCPSystem class</a>
</li>
<li>
<a href="#004000000000">Software documentation for the TCPTransport class</a>
</li>
<li>
<a href="#005000000000">Software documentation for the TCPConnecting protocol</a>
</li>
<li>
<a href="#006000000000">NetTCP variables</a>
</li>
</ol>
<hr width="50%" align="left" />
</div>
<h1><a name="001000000000">
Software documentation for the TCPConnecting class
</a></h1>
<h2><a name="class$TCPConnecting">TCPConnecting</a> : NSObject</h2>
<blockquote class="declared">
<dl>
<dt><b>Declared in:</b></dt>
<dd>NetTCP.h</dd>
</dl>
</blockquote>
<blockquote>
<dl>
<dt><b>Conforms to:</b></dt>
<dd><a rel="gsdoc" href="NetBase.html#protocol$(NetObject)">NetObject</a></dd>
</dl>
</blockquote>
<div class="desc">
If an object was attempted to have been connected in the
background, this is a placeholder for that
ongoing connection.
<a rel="gsdoc" href="#method$TCPSystem-connectNetObjectInBackground$toHost$onPort$withTimeout$">-connectNetObjectInBackground:toHost:onPort:withTimeout:</a>
will return an instance of this object. This placeholder object can be used to cancel an ongoing connection with the <a rel="gsdoc" href="#method$TCPConnecting-abortConnection">-abortConnection</a>
method.
</div>
<hr width="50%" align="left" />
<a href="#_TCPConnecting_ivars">Instance Variables</a>
<br/><br/>
<b>Method summary</b>
<ul>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPConnecting-abortConnection">-abortConnection</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPConnecting-connectionEstablished$">-connectionEstablished:</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPConnecting-connectionLost">-connectionLost</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPConnecting-dataReceived$">-dataReceived:</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPConnecting-netObject">-netObject</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPConnecting-transport">-transport</a></li>
</ul>
<hr width="50%" align="left" />
<div class="method">
<h3><a name="method$TCPConnecting-abortConnection">abortConnection </a></h3>
- (void) <b>abortConnection</b>;<br />
<div class="desc">
Aborts the ongoing connection. If the net object
conforms to the
<a rel="gsdoc" href="#protocol$(TCPConnecting)"><TCPConnecting></a>
protocol, it will receive a
<a rel="gsdoc" href="#method$(TCPConnecting)-connectingFailed$">[<TCPConnecting>-connectingFailed:]</a>
message with a argument of <code>NetclassesErrorAborted</code>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPConnecting-connectionEstablished$">connectionEstablished: </a></h3>
- (id) <b>connectionEstablished:</b> (id<<a rel="gsdoc" href="NetBase.html#protocol$(NetTransport)">NetTransport</a>>)aTransport;<br />
<div class="desc">
Sets up the connection placeolder. If the net object
conforms to
<a rel="gsdoc" href="#protocol$(TCPConnecting)"><TCPConnecting></a>
, it will receive a
<a rel="gsdoc" href="#method$(TCPConnecting)-connectingStarted$">[<TCPConnecting>-connectingStarted:]</a>
with the instance of TCPConnecting as an argument.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPConnecting-connectionLost">connectionLost </a></h3>
- (void) <b>connectionLost</b>;<br />
<div class="desc">
Cleans up the connection placeholder. This will
release the transport.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPConnecting-dataReceived$">dataReceived: </a></h3>
- (id) <b>dataReceived:</b> (NSData*)data;<br />
<div class="desc">
This shouldn't happen while a class is connecting, but
included to conform to the
<a rel="gsdoc" href="NetBase.html#protocol$(NetObject)"><NetObject></a>
protocol.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPConnecting-netObject">netObject </a></h3>
- (id<<a rel="gsdoc" href="NetBase.html#protocol$(NetObject)">NetObject</a>>) <b>netObject</b>;<br />
<div class="desc">
Returns the object that will be connected by this
placeholder object.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPConnecting-transport">transport </a></h3>
- (id<<a rel="gsdoc" href="NetBase.html#protocol$(NetTransport)">NetTransport</a>>) <b>transport</b>;<br />
<div class="desc">
Returns the transport used by this object. Will not
be the same transport given to the net object when the
connection is made.
</div>
<hr width="25%" align="left" />
</div>
<a name="_TCPConnecting_ivars"/> <br/><hr width="50%" align="left" />
<h2>Instance Variables for TCPConnecting Class</h2>
<h3><a name="ivariable$TCPConnecting*netObject">netObject</a></h3>
@protected id <b>netObject</b>;<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
<h3><a name="ivariable$TCPConnecting*timeout">timeout</a></h3>
@protected NSTimer* <b>timeout</b>;<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
<h3><a name="ivariable$TCPConnecting*transport">transport</a></h3>
@protected id<NetTransport> <b>transport</b>;<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
<br/><hr width="50%" align="left" /><br/>
<h1><a name="002000000000">
Software documentation for the TCPPort class
</a></h1>
<h2><a name="class$TCPPort">TCPPort</a> : NSObject</h2>
<blockquote class="declared">
<dl>
<dt><b>Declared in:</b></dt>
<dd>NetTCP.h</dd>
</dl>
</blockquote>
<blockquote>
<dl>
<dt><b>Conforms to:</b></dt>
<dd><a rel="gsdoc" href="NetBase.html#protocol$(NetPort)">NetPort</a></dd>
</dl>
</blockquote>
<div class="desc">
TCPPort is a class that is used to bind a descriptor
to a certain TCP/IP port and listen for connections. When
a connection is received, it will create a class set with
<a rel="gsdoc" href="#method$TCPPort-setNetObject$">
-setNetObject:
</a>
and set it up with the new connection. When the TCPPort
is dealloc'd it will close the descriptor if it had not
been closed already.
</div>
<hr width="50%" align="left" />
<a href="#_TCPPort_ivars">Instance Variables</a>
<br/><br/>
<b>Method summary</b>
<ul>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPPort-close">-close</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPPort-connectionLost">-connectionLost</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPPort-desc">-desc</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPPort-initOnHost$onPort$">-initOnHost:onPort:</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPPort-initOnPort$">-initOnPort:</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPPort-newConnection">-newConnection</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPPort-port">-port</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPPort-setNetObject$">-setNetObject:</a></li>
</ul>
<hr width="50%" align="left" />
<div class="method">
<h3><a name="method$TCPPort-close">close </a></h3>
- (void) <b>close</b>;<br />
<div class="desc">
Closes the descriptor.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPPort-connectionLost">connectionLost </a></h3>
- (void) <b>connectionLost</b>;<br />
<div class="desc">
Called when the connection is closed.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPPort-desc">desc </a></h3>
- (int) <b>desc</b>;<br />
<div class="desc">
Returns the low-level file descriptor for the port.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPPort-initOnHost$onPort$">initOnHost: onPort: </a></h3>
- (id) <b>initOnHost:</b> (NSHost*)aHost<b> onPort:</b> (uint16_t)aPort;<br />
<div class="desc">
Initializes a port on <var>aHost</var> and
binds it to port <var>aPort</var>. If
<var>aHost</var> is <code>nil</code>, it will set it
up on all addresses on the local machine. Using zero for
<var>aPort</var> will use a random currently
available port number. Use
<a rel="gsdoc" href="#method$TCPPort-port">
-port
</a>
to find out where it is actually bound to.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPPort-initOnPort$">initOnPort: </a></h3>
- (id) <b>initOnPort:</b> (uint16_t)aPort;<br />
<div class="desc">
Calls
<a rel="gsdoc" href="#method$TCPPort-initOnHost$onPort$">
-initOnHost:onPort:
</a>
with a <code>nil</code> argument for the host.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPPort-newConnection">newConnection </a></h3>
- (id) <b>newConnection</b>;<br />
<div class="desc">
Called when a new connection occurs. Will initialize
a new object of the class set with
<a rel="gsdoc" href="#method$TCPPort-setNetObject$">
-setNetObject:
</a>
with the new connection.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPPort-port">port </a></h3>
- (uint16_t) <b>port</b>;<br />
<div class="desc">
Returns the port that this TCPPort is currently
bound to.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPPort-setNetObject$">setNetObject: </a></h3>
- (id) <b>setNetObject:</b> (Class)aClass;<br />
<div class="desc">
Sets the class that will be initialized if a
connection occurs on this port. If
<var>aClass</var> does not implement the
<a rel="gsdoc" href="NetBase.html#protocol$(NetObject)"><NetObject></a>
protocol, will throw a FatalNetException.
</div>
<hr width="25%" align="left" />
</div>
<a name="_TCPPort_ivars"/> <br/><hr width="50%" align="left" />
<h2>Instance Variables for TCPPort Class</h2>
<h3><a name="ivariable$TCPPort*connected">connected</a></h3>
@protected BOOL <b>connected</b>;<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
<h3><a name="ivariable$TCPPort*desc">desc</a></h3>
@protected int <b>desc</b>;<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
<h3><a name="ivariable$TCPPort*netObjectClass">netObjectClass</a></h3>
@protected Class <b>netObjectClass</b>;<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
<h3><a name="ivariable$TCPPort*port">port</a></h3>
@protected uint16_t <b>port</b>;<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
<br/><hr width="50%" align="left" /><br/>
<h1><a name="003000000000">
Software documentation for the TCPSystem class
</a></h1>
<h2><a name="class$TCPSystem">TCPSystem</a> : NSObject</h2>
<blockquote class="declared">
<dl>
<dt><b>Declared in:</b></dt>
<dd>NetTCP.h</dd>
</dl>
</blockquote>
<div class="desc">
Used for certain operations in the TCP/IP system. There
is only one instance of this class at a time, used
<a rel="gsdoc" href="#method$TCPSystem+sharedInstance">
+sharedInstance
</a>
to get this instance.
</div>
<hr width="50%" align="left" />
<a href="#_TCPSystem_ivars">Instance Variables</a>
<br/><br/>
<b>Method summary</b>
<ul>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPSystem+sharedInstance">+sharedInstance</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPSystem-connectNetObject$toHost$onPort$withTimeout$">-connectNetObject:toHost:onPort:withTimeout:</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPSystem-connectNetObjectInBackground$toHost$onPort$withTimeout$">-connectNetObjectInBackground:toHost:onPort:withTimeout:</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPSystem-errorNumber">-errorNumber</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPSystem-errorString">-errorString</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPSystem-hostFromHostOrderInteger$">-hostFromHostOrderInteger:</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPSystem-hostFromNetworkOrderInteger$">-hostFromNetworkOrderInteger:</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPSystem-hostOrderInteger$fromHost$">-hostOrderInteger:fromHost:</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPSystem-networkOrderInteger$fromHost$">-networkOrderInteger:fromHost:</a></li>
</ul>
<hr width="50%" align="left" />
<div class="method">
<h3><a name="method$TCPSystem+sharedInstance">sharedInstance </a></h3>
+ (id) <b>sharedInstance</b>;<br />
<div class="desc">
Returns the one instance of TCPSystem currently in
existence.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPSystem-connectNetObject$toHost$onPort$withTimeout$">connectNetObject: toHost: onPort: withTimeout: </a></h3>
- (id<<a rel="gsdoc" href="NetBase.html#protocol$(NetObject)">NetObject</a>>) <b>connectNetObject:</b> (id<<a rel="gsdoc" href="NetBase.html#protocol$(NetObject)">NetObject</a>>)netObject<b> toHost:</b> (NSHost*)aHost<b> onPort:</b> (uint16_t)aPort<b> withTimeout:</b> (int)aTimeout;<br />
<div class="desc">
Will connect the object <var>netObject</var> to host
<var>aHost</var> on port <var>aPort</var>. If this
connection doesn't happen in <var>aTimeout</var>
seconds or some other error occurs, it will return
<code>nil</code> and the error string and error
number shall be set accordingly. Otherwise this will
return <var>netObject</var>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPSystem-connectNetObjectInBackground$toHost$onPort$withTimeout$">connectNetObjectInBackground: toHost: onPort: withTimeout: </a></h3>
- (<a rel="gsdoc" href="#class$TCPConnecting">TCPConnecting</a>*) <b>connectNetObjectInBackground:</b> (id<<a rel="gsdoc" href="NetBase.html#protocol$(NetObject)">NetObject</a>>)netObject<b> toHost:</b> (NSHost*)aHost<b> onPort:</b> (uint16_t)aPort<b> withTimeout:</b> (int)aTimeout;<br />
<div class="desc">
Connects <var>netObject</var> to host
<var>aHost</var> on the port <var>aPort</var>.
Returns a place holder object that finishes the
connection in the background. The placeholder
will fail if the connection does not occur in
<var>aTimeout</var> seconds. Returns <code>nil</code>
if an error occurs and sets the error string and error
number accordingly.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPSystem-errorNumber">errorNumber </a></h3>
- (int) <b>errorNumber</b>;<br />
<div class="desc">
Returns the errno of the last error that occurred.
If it is some other non-system error, this will be zero,
but the error string shall be set accordingly.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPSystem-errorString">errorString </a></h3>
- (NSString*) <b>errorString</b>;<br />
<div class="desc">
Returns the error string of the last error that
occurred.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPSystem-hostFromHostOrderInteger$">hostFromHostOrderInteger: </a></h3>
- (NSHost*) <b>hostFromHostOrderInteger:</b> (uint32_t)ip;<br />
<div class="desc">
Returns a host from a network order 32-bit integer
<var>ip</var> address.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPSystem-hostFromNetworkOrderInteger$">hostFromNetworkOrderInteger: </a></h3>
- (NSHost*) <b>hostFromNetworkOrderInteger:</b> (uint32_t)ip;<br />
<div class="desc">
Returns a host from a host order 32-bit integer
<var>ip</var> address.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPSystem-hostOrderInteger$fromHost$">hostOrderInteger: fromHost: </a></h3>
- (BOOL) <b>hostOrderInteger:</b> (uint32_t*)aNumber<b> fromHost:</b> (NSHost*)aHost;<br />
<div class="desc">
Returns a host order 32-bit integer from a host
Returns <code>YES</code> on success and
<code>NO</code> on failure, the result is stored in
the 32-bit integer pointed to by <var>aNumber</var>
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPSystem-networkOrderInteger$fromHost$">networkOrderInteger: fromHost: </a></h3>
- (BOOL) <b>networkOrderInteger:</b> (uint32_t*)aNumber<b> fromHost:</b> (NSHost*)aHost;<br />
<div class="desc">
Returns a network order 32-bit integer from a host
Returns <code>YES</code> on success and
<code>NO</code> on failure, the result is stored in
the 32-bit integer pointed to by <var>aNumber</var>
</div>
<hr width="25%" align="left" />
</div>
<a name="_TCPSystem_ivars"/> <br/><hr width="50%" align="left" />
<h2>Instance Variables for TCPSystem Class</h2>
<h3><a name="ivariable$TCPSystem*errorNumber">errorNumber</a></h3>
@protected int <b>errorNumber</b>;<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
<h3><a name="ivariable$TCPSystem*errorString">errorString</a></h3>
@protected NSString* <b>errorString</b>;<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
<br/><hr width="50%" align="left" /><br/>
<h1><a name="004000000000">
Software documentation for the TCPTransport class
</a></h1>
<h2><a name="class$TCPTransport">TCPTransport</a> : NSObject</h2>
<blockquote class="declared">
<dl>
<dt><b>Declared in:</b></dt>
<dd>NetTCP.h</dd>
</dl>
</blockquote>
<blockquote>
<dl>
<dt><b>Conforms to:</b></dt>
<dd><a rel="gsdoc" href="NetBase.html#protocol$(NetTransport)">NetTransport</a></dd>
</dl>
</blockquote>
<div class="desc">
Handles the actual TCP/IP transfer of data. When an
instance of this object is deallocated, the
descriptor will be closed if not already closed.
</div>
<hr width="50%" align="left" />
<a href="#_TCPTransport_ivars">Instance Variables</a>
<br/><br/>
<b>Method summary</b>
<ul>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPTransport-close">-close</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPTransport-desc">-desc</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPTransport-initWithDesc$withRemoteHost$">-initWithDesc:withRemoteHost:</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPTransport-isDoneWriting">-isDoneWriting</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPTransport-localHost">-localHost</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPTransport-readData$">-readData:</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPTransport-remoteHost">-remoteHost</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$TCPTransport-writeData$">-writeData:</a></li>
</ul>
<hr width="50%" align="left" />
<div class="method">
<h3><a name="method$TCPTransport-close">close </a></h3>
- (void) <b>close</b>;<br />
<div class="desc">
Closes the transport and makes sure there is no more
incoming or outgoing data on the connection.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPTransport-desc">desc </a></h3>
- (int) <b>desc</b>;<br />
<div class="desc">
Returns the low level file descriptor that is used
internally.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPTransport-initWithDesc$withRemoteHost$">initWithDesc: withRemoteHost: </a></h3>
- (id) <b>initWithDesc:</b> (int)aDesc<b> withRemoteHost:</b> (NSHost*)theAddress;<br />
<div class="desc">
Initializes the transport with the file
descriptor <var>aDesc</var>.
<var>theAddress</var> is the host that the flie
descriptor is connected to.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPTransport-isDoneWriting">isDoneWriting </a></h3>
- (BOOL) <b>isDoneWriting</b>;<br />
<div class="desc">
Returns <code>YES</code> if there is no more data
to write in the buffer and <code>NO</code> if there is.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPTransport-localHost">localHost </a></h3>
- (id) <b>localHost</b>;<br />
<div class="desc">
Returns a NSHost of the local side of a connection.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPTransport-readData$">readData: </a></h3>
- (NSData*) <b>readData:</b> (int)maxDataSize;<br />
<div class="desc">
Handles the actual reading of data from the
connection. Throws an exception if an error
occurs while reading data. The @"Data" key in the
userInfo for these exceptions should be any NSData
that could not be returned. If <var>maxDataSize</var>
is <= 0, all possible data will be read.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPTransport-remoteHost">remoteHost </a></h3>
- (id) <b>remoteHost</b>;<br />
<div class="desc">
Returns a NSHost of the remote side of a
connection.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$TCPTransport-writeData$">writeData: </a></h3>
- (id) <b>writeData:</b> (NSData*)aData;<br />
<div class="desc">
If <var>aData</var> is <code>nil</code>, this will
physically transport the data to the connected
end. Otherwise this will put the data in the buffer of
data that needs to be written to the connection when
next possible.
</div>
<hr width="25%" align="left" />
</div>
<a name="_TCPTransport_ivars"/> <br/><hr width="50%" align="left" />
<h2>Instance Variables for TCPTransport Class</h2>
<h3><a name="ivariable$TCPTransport*connected">connected</a></h3>
@protected BOOL <b>connected</b>;<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
<h3><a name="ivariable$TCPTransport*desc">desc</a></h3>
@protected int <b>desc</b>;<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
<h3><a name="ivariable$TCPTransport*localHost">localHost</a></h3>
@protected NSHost* <b>localHost</b>;<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
<h3><a name="ivariable$TCPTransport*remoteHost">remoteHost</a></h3>
@protected NSHost* <b>remoteHost</b>;<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
<h3><a name="ivariable$TCPTransport*writeBuffer">writeBuffer</a></h3>
@protected NSMutableData* <b>writeBuffer</b>;<br />
<div class="desc">
<em>Description forthcoming.</em>
</div>
<hr width="25%" align="left" />
<br/><hr width="50%" align="left" /><br/>
<h1><a name="005000000000">
Software documentation for the TCPConnecting protocol
</a></h1>
<h2><a name="protocol$(TCPConnecting)">TCPConnecting</a></h2>
<blockquote class="declared">
<dl>
<dt><b>Declared in:</b></dt>
<dd>NetTCP.h</dd>
</dl>
</blockquote>
<div class="desc">
A class can implement this protocol, and when it is
connected in the background using
<a rel="gsdoc" href="#method$TCPSystem-connectNetObjectInBackground$toHost$onPort$withTimeout$">-connectNetObjectInBackground:toHost:onPort:withTimeout:</a>
it will receive the messages in this protocol which notify the object of certain events while being connected in the background.
</div>
<b>Method summary</b>
<ul>
<li><a rel="gsdoc" href="NetTCP.html#method$(TCPConnecting)-connectingFailed$">-connectingFailed:</a></li>
<li><a rel="gsdoc" href="NetTCP.html#method$(TCPConnecting)-connectingStarted$">-connectingStarted:</a></li>
</ul>
<hr width="50%" align="left" />
<div class="method">
<h3><a name="method$(TCPConnecting)-connectingFailed$">connectingFailed: </a></h3>
- (id) <b>connectingFailed:</b> (NSString*)aError;<br />
<div class="desc">
Tells the class implementing this protocol that the
error in <var>aError</var> has occurred and the
connection will not be established
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$(TCPConnecting)-connectingStarted$">connectingStarted: </a></h3>
- (id) <b>connectingStarted:</b> (<a rel="gsdoc" href="#class$TCPConnecting">TCPConnecting</a>*)aConnection;<br />
<div class="desc">
Tells the class implementing this protocol that the
connection has begun and will be using the
connection place holder <var>aConnection</var>
</div>
<hr width="25%" align="left" />
</div>
<h1><a name="006000000000">NetTCP variables</a></h1>
<p>
</p>
<h3><a name="variable$NetclassesErrorAborted">NetclassesErrorAborted</a></h3>
NSString* NetclassesErrorAborted;<br />
<div class="desc">
The error message used when a connection is aborted.
</div>
<hr width="25%" align="left" />
<h3><a name="variable$NetclassesErrorBadAddress">NetclassesErrorBadAddress</a></h3>
NSString* NetclassesErrorBadAddress;<br />
<div class="desc">
Could be the current error string if the error number
is zero and some error has occurred. Indicates that a
NSHost returned an address that was invalid.
</div>
<hr width="25%" align="left" />
<h3><a name="variable$NetclassesErrorTimeout">NetclassesErrorTimeout</a></h3>
NSString* NetclassesErrorTimeout;<br />
<div class="desc">
If an error occurs and error number is zero, this could be
the error string. This error occurs when some operation
times out.
</div>
<hr width="25%" align="left" />
<br />
<a href="index.html">Up</a>
</font>
</body>
</html>
|