/Pods/Documentation/CocoaAsyncSocket/html/Classes/AsyncSocket.html
HTML | 2723 lines | 1419 code | 1304 blank | 0 comment | 0 complexity | 521388357f202c0aa2f3639ba34346b2 MD5 | raw file
Possible License(s): BSD-3-Clause
Large files files are truncated, but you can click here to view the full file
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
- <title>AsyncSocket Class Reference</title>
- <meta id="xcode-display" name="xcode-display" content="render"/>
- <link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
- <link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
- <meta name="generator" content="appledoc 2.1 (build 858)" />
- </head>
- <body>
- <header id="top_header">
- <div id="library" class="hideInXcode">
- <h1><a id="libraryTitle" href="../index.html">CocoaAsyncSocket 0.0.1 </a></h1>
- <a id="developerHome" href="../index.html">Dustin Voss and Robbie Hanson</a>
- </div>
-
- <div id="title" role="banner">
- <h1 class="hideInXcode">AsyncSocket Class Reference</h1>
- </div>
- <ul id="headerButtons" role="toolbar">
- <li id="toc_button">
- <button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
- </li>
- <li id="jumpto_button" role="navigation">
- <select id="jumpTo">
- <option value="top">Jump To…</option>
-
-
-
-
- <option value="tasks">Tasks</option>
-
-
-
-
-
-
-
- <option value="class_methods">Class Methods</option>
-
- <option value="//api/name/CRData"> + CRData</option>
-
- <option value="//api/name/CRLFData"> + CRLFData</option>
-
- <option value="//api/name/LFData"> + LFData</option>
-
- <option value="//api/name/ZeroData"> + ZeroData</option>
-
-
-
-
- <option value="instance_methods">Instance Methods</option>
-
- <option value="//api/name/acceptOnInterface:port:error:"> - acceptOnInterface:port:error:</option>
-
- <option value="//api/name/acceptOnPort:error:"> - acceptOnPort:error:</option>
-
- <option value="//api/name/addRunLoopMode:"> - addRunLoopMode:</option>
-
- <option value="//api/name/canSafelySetDelegate"> - canSafelySetDelegate</option>
-
- <option value="//api/name/connectToAddress:error:"> - connectToAddress:error:</option>
-
- <option value="//api/name/connectToAddress:viaInterfaceAddress:withTimeout:error:"> - connectToAddress:viaInterfaceAddress:withTimeout:error:</option>
-
- <option value="//api/name/connectToAddress:withTimeout:error:"> - connectToAddress:withTimeout:error:</option>
-
- <option value="//api/name/connectToHost:onPort:error:"> - connectToHost:onPort:error:</option>
-
- <option value="//api/name/connectToHost:onPort:withTimeout:error:"> - connectToHost:onPort:withTimeout:error:</option>
-
- <option value="//api/name/connectedAddress"> - connectedAddress</option>
-
- <option value="//api/name/connectedHost"> - connectedHost</option>
-
- <option value="//api/name/connectedPort"> - connectedPort</option>
-
- <option value="//api/name/delegate"> - delegate</option>
-
- <option value="//api/name/description"> - description</option>
-
- <option value="//api/name/disconnect"> - disconnect</option>
-
- <option value="//api/name/disconnectAfterReading"> - disconnectAfterReading</option>
-
- <option value="//api/name/disconnectAfterReadingAndWriting"> - disconnectAfterReadingAndWriting</option>
-
- <option value="//api/name/disconnectAfterWriting"> - disconnectAfterWriting</option>
-
- <option value="//api/name/enablePreBuffering"> - enablePreBuffering</option>
-
- <option value="//api/name/getCFReadStream"> - getCFReadStream</option>
-
- <option value="//api/name/getCFSocket"> - getCFSocket</option>
-
- <option value="//api/name/getCFWriteStream"> - getCFWriteStream</option>
-
- <option value="//api/name/init"> - init</option>
-
- <option value="//api/name/initWithDelegate:"> - initWithDelegate:</option>
-
- <option value="//api/name/initWithDelegate:userData:"> - initWithDelegate:userData:</option>
-
- <option value="//api/name/isConnected"> - isConnected</option>
-
- <option value="//api/name/isIPv4"> - isIPv4</option>
-
- <option value="//api/name/isIPv6"> - isIPv6</option>
-
- <option value="//api/name/localAddress"> - localAddress</option>
-
- <option value="//api/name/localHost"> - localHost</option>
-
- <option value="//api/name/localPort"> - localPort</option>
-
- <option value="//api/name/moveToRunLoop:"> - moveToRunLoop:</option>
-
- <option value="//api/name/progressOfReadReturningTag:bytesDone:total:"> - progressOfReadReturningTag:bytesDone:total:</option>
-
- <option value="//api/name/progressOfWriteReturningTag:bytesDone:total:"> - progressOfWriteReturningTag:bytesDone:total:</option>
-
- <option value="//api/name/readDataToData:withTimeout:buffer:bufferOffset:maxLength:tag:"> - readDataToData:withTimeout:buffer:bufferOffset:maxLength:tag:</option>
-
- <option value="//api/name/readDataToData:withTimeout:buffer:bufferOffset:tag:"> - readDataToData:withTimeout:buffer:bufferOffset:tag:</option>
-
- <option value="//api/name/readDataToData:withTimeout:maxLength:tag:"> - readDataToData:withTimeout:maxLength:tag:</option>
-
- <option value="//api/name/readDataToData:withTimeout:tag:"> - readDataToData:withTimeout:tag:</option>
-
- <option value="//api/name/readDataToLength:withTimeout:buffer:bufferOffset:tag:"> - readDataToLength:withTimeout:buffer:bufferOffset:tag:</option>
-
- <option value="//api/name/readDataToLength:withTimeout:tag:"> - readDataToLength:withTimeout:tag:</option>
-
- <option value="//api/name/readDataWithTimeout:buffer:bufferOffset:maxLength:tag:"> - readDataWithTimeout:buffer:bufferOffset:maxLength:tag:</option>
-
- <option value="//api/name/readDataWithTimeout:buffer:bufferOffset:tag:"> - readDataWithTimeout:buffer:bufferOffset:tag:</option>
-
- <option value="//api/name/readDataWithTimeout:tag:"> - readDataWithTimeout:tag:</option>
-
- <option value="//api/name/removeRunLoopMode:"> - removeRunLoopMode:</option>
-
- <option value="//api/name/runLoopModes"> - runLoopModes</option>
-
- <option value="//api/name/setDelegate:"> - setDelegate:</option>
-
- <option value="//api/name/setRunLoopModes:"> - setRunLoopModes:</option>
-
- <option value="//api/name/setUserData:"> - setUserData:</option>
-
- <option value="//api/name/startTLS:"> - startTLS:</option>
-
- <option value="//api/name/unreadData"> - unreadData</option>
-
- <option value="//api/name/userData"> - userData</option>
-
- <option value="//api/name/writeData:withTimeout:tag:"> - writeData:withTimeout:tag:</option>
-
-
-
- </select>
- </li>
- </ul>
- </header>
- <nav id="tocContainer" class="isShowingTOC">
- <ul id="toc" role="tree">
-
- <li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
-
- </ul></li>
- <li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/CRData">CRData</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/CRLFData">CRLFData</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/LFData">LFData</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/ZeroData">ZeroData</a></span></li>
-
- </ul></li>
- <li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/acceptOnInterface:port:error:">acceptOnInterface:port:error:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/acceptOnPort:error:">acceptOnPort:error:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/addRunLoopMode:">addRunLoopMode:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/canSafelySetDelegate">canSafelySetDelegate</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/connectToAddress:error:">connectToAddress:error:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/connectToAddress:viaInterfaceAddress:withTimeout:error:">connectToAddress:viaInterfaceAddress:withTimeout:error:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/connectToAddress:withTimeout:error:">connectToAddress:withTimeout:error:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/connectToHost:onPort:error:">connectToHost:onPort:error:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/connectToHost:onPort:withTimeout:error:">connectToHost:onPort:withTimeout:error:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/connectedAddress">connectedAddress</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/connectedHost">connectedHost</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/connectedPort">connectedPort</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/delegate">delegate</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/description">description</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/disconnect">disconnect</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/disconnectAfterReading">disconnectAfterReading</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/disconnectAfterReadingAndWriting">disconnectAfterReadingAndWriting</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/disconnectAfterWriting">disconnectAfterWriting</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/enablePreBuffering">enablePreBuffering</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/getCFReadStream">getCFReadStream</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/getCFSocket">getCFSocket</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/getCFWriteStream">getCFWriteStream</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/init">init</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/initWithDelegate:">initWithDelegate:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/initWithDelegate:userData:">initWithDelegate:userData:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/isConnected">isConnected</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/isIPv4">isIPv4</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/isIPv6">isIPv6</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/localAddress">localAddress</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/localHost">localHost</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/localPort">localPort</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/moveToRunLoop:">moveToRunLoop:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/progressOfReadReturningTag:bytesDone:total:">progressOfReadReturningTag:bytesDone:total:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/progressOfWriteReturningTag:bytesDone:total:">progressOfWriteReturningTag:bytesDone:total:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/readDataToData:withTimeout:buffer:bufferOffset:maxLength:tag:">readDataToData:withTimeout:buffer:bufferOffset:maxLength:tag:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/readDataToData:withTimeout:buffer:bufferOffset:tag:">readDataToData:withTimeout:buffer:bufferOffset:tag:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/readDataToData:withTimeout:maxLength:tag:">readDataToData:withTimeout:maxLength:tag:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/readDataToData:withTimeout:tag:">readDataToData:withTimeout:tag:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/readDataToLength:withTimeout:buffer:bufferOffset:tag:">readDataToLength:withTimeout:buffer:bufferOffset:tag:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/readDataToLength:withTimeout:tag:">readDataToLength:withTimeout:tag:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/readDataWithTimeout:buffer:bufferOffset:maxLength:tag:">readDataWithTimeout:buffer:bufferOffset:maxLength:tag:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/readDataWithTimeout:buffer:bufferOffset:tag:">readDataWithTimeout:buffer:bufferOffset:tag:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/readDataWithTimeout:tag:">readDataWithTimeout:tag:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/removeRunLoopMode:">removeRunLoopMode:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/runLoopModes">runLoopModes</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setDelegate:">setDelegate:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setRunLoopModes:">setRunLoopModes:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setUserData:">setUserData:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/startTLS:">startTLS:</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/unreadData">unreadData</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/userData">userData</a></span></li>
-
- <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/writeData:withTimeout:tag:">writeData:withTimeout:tag:</a></span></li>
-
- </ul></li>
- </ul>
- </nav>
- <article>
- <div id="contents" class="isShowingTOC" role="main">
- <a title="AsyncSocket Class Reference" name="top"></a>
- <div class="main-navigation navigation-top">
- <ul>
- <li><a href="../index.html">Index</a></li>
- <li><a href="../hierarchy.html">Hierarchy</a></li>
- </ul>
- </div>
- <div id="header">
- <div class="section-header">
- <h1 class="title title-header">AsyncSocket Class Reference</h1>
- </div>
- </div>
- <div id="container">
-
- <div class="section section-specification"><table cellspacing="0"><tbody>
- <tr>
- <td class="specification-title">Inherits from</td>
- <td class="specification-value">NSObject</td>
- </tr><tr>
- <td class="specification-title">Declared in</td>
- <td class="specification-value">AsyncSocket.h</td>
- </tr>
- </tbody></table></div>
-
-
-
-
-
-
- <div class="section section-tasks">
- <a title="Tasks" name="tasks"></a>
- <h2 class="subtitle subtitle-tasks">Tasks</h2>
-
-
-
-
- <ul class="task-list">
- <li>
- <span class="tooltip">
- <code><a href="#//api/name/init">– init</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/initWithDelegate:">– initWithDelegate:</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/initWithDelegate:userData:">– initWithDelegate:userData:</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/description">– description</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/delegate">– delegate</a></code>
- <span class="tooltip"><p>Use “canSafelySetDelegate” to see if there is any pending business (reads and writes) with the current delegate<br/>
- before changing it. It is, of course, safe to change the delegate before connecting or accepting connections.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/canSafelySetDelegate">– canSafelySetDelegate</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/setDelegate:">– setDelegate:</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/userData">– userData</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/setUserData:">– setUserData:</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/getCFSocket">– getCFSocket</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/getCFReadStream">– getCFReadStream</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/getCFWriteStream">– getCFWriteStream</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/acceptOnPort:error:">– acceptOnPort:error:</a></code>
- <span class="tooltip"><p>Tells the socket to begin listening and accepting connections on the given port.<br/>
- When a connection comes in, the AsyncSocket instance will call the various <a href="#//api/name/delegate">delegate</a> methods (see above).<br/>
- The socket will listen on all available interfaces (e.g. wifi, ethernet, etc)</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/acceptOnInterface:port:error:">– acceptOnInterface:port:error:</a></code>
- <span class="tooltip"><p>This method is the same as <a href="#//api/name/acceptOnPort:error:">acceptOnPort:error:</a> with the additional option<br/>
- of specifying which interface to listen on. So, for example, if you were writing code for a server that<br/>
- has multiple IP addresses, you could specify which address you wanted to listen on. Or you could use it<br/>
- to specify that the socket should only accept connections over ethernet, and not other interfaces such as wifi.<br/>
- You may also use the special strings “localhost” or “loopback” to specify that<br/>
- the socket only accept connections from the local machine.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/connectToHost:onPort:error:">– connectToHost:onPort:error:</a></code>
- <span class="tooltip"><p>Connects to the given host and port.<br/>
- The host may be a domain name (e.g. “deusty.com”) or an IP address string (e.g. “192.168.0.2”)</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/connectToHost:onPort:withTimeout:error:">– connectToHost:onPort:withTimeout:error:</a></code>
- <span class="tooltip"><p>This method is the same as <a href="#//api/name/connectToHost:onPort:error:">connectToHost:onPort:error:</a> with an additional timeout option.<br/>
- To not time out use a negative time interval, or simply use the <a href="#//api/name/connectToHost:onPort:error:">connectToHost:onPort:error:</a> method.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/connectToAddress:error:">– connectToAddress:error:</a></code>
- <span class="tooltip"><p>Connects to the given address, specified as a sockaddr structure wrapped in a NSData object.<br/>
- For example, a NSData object returned from NSNetService’s addresses method.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/connectToAddress:withTimeout:error:">– connectToAddress:withTimeout:error:</a></code>
- <span class="tooltip"><p>This method is the same as <a href="#//api/name/connectToAddress:error:">connectToAddress:error:</a> with an additional timeout option.<br/>
- To not time out use a negative time interval, or simply use the <a href="#//api/name/connectToAddress:error:">connectToAddress:error:</a> method.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/connectToAddress:viaInterfaceAddress:withTimeout:error:">– connectToAddress:viaInterfaceAddress:withTimeout:error:</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/disconnect">– disconnect</a></code>
- <span class="tooltip"><p>Disconnects immediately. Any pending reads or writes are dropped.<br/>
- If the socket is not already disconnected, the onSocketDidDisconnect <a href="#//api/name/delegate">delegate</a> method<br/>
- will be called immediately, before this method returns.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/disconnectAfterReading">– disconnectAfterReading</a></code>
- <span class="tooltip"><p>Disconnects after all pending reads have completed.<br/>
- After calling this, the read and write methods will do nothing.<br/>
- The socket will <a href="#//api/name/disconnect">disconnect</a> even if there are still pending writes.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/disconnectAfterWriting">– disconnectAfterWriting</a></code>
- <span class="tooltip"><p>Disconnects after all pending writes have completed.<br/>
- After calling this, the read and write methods will do nothing.<br/>
- The socket will <a href="#//api/name/disconnect">disconnect</a> even if there are still pending reads.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/disconnectAfterReadingAndWriting">– disconnectAfterReadingAndWriting</a></code>
- <span class="tooltip"><p>Disconnects after all pending reads and writes have completed.<br/>
- After calling this, the read and write methods will do nothing.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/isConnected">– isConnected</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/connectedHost">– connectedHost</a></code>
- <span class="tooltip"><p>Returns the local or remote host and port to which this socket is connected, or nil and 0 if not connected.<br/>
- The host will be an IP address.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/connectedPort">– connectedPort</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/localHost">– localHost</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/localPort">– localPort</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/connectedAddress">– connectedAddress</a></code>
- <span class="tooltip"><p>Returns the local or remote address to which this socket is connected,<br/>
- specified as a sockaddr structure wrapped in a NSData object.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/localAddress">– localAddress</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/isIPv4">– isIPv4</a></code>
- <span class="tooltip"><p>Returns whether the socket is IPv4 or IPv6.<br/>
- An accepting socket may be both.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/isIPv6">– isIPv6</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/readDataWithTimeout:tag:">– readDataWithTimeout:tag:</a></code>
- <span class="tooltip"><p>Reads the first available bytes that become available on the socket.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/readDataWithTimeout:buffer:bufferOffset:tag:">– readDataWithTimeout:buffer:bufferOffset:tag:</a></code>
- <span class="tooltip"><p>Reads the first available bytes that become available on the socket.<br/>
- The bytes will be appended to the given byte buffer starting at the given offset.<br/>
- The given buffer will automatically be increased in size if needed.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/readDataWithTimeout:buffer:bufferOffset:maxLength:tag:">– readDataWithTimeout:buffer:bufferOffset:maxLength:tag:</a></code>
- <span class="tooltip"><p>Reads the first available bytes that become available on the socket.<br/>
- The bytes will be appended to the given byte buffer starting at the given offset.<br/>
- The given buffer will automatically be increased in size if needed.<br/>
- A maximum of length bytes will be read.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/readDataToLength:withTimeout:tag:">– readDataToLength:withTimeout:tag:</a></code>
- <span class="tooltip"><p>Reads the given number of bytes.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/readDataToLength:withTimeout:buffer:bufferOffset:tag:">– readDataToLength:withTimeout:buffer:bufferOffset:tag:</a></code>
- <span class="tooltip"><p>Reads the given number of bytes.<br/>
- The bytes will be appended to the given byte buffer starting at the given offset.<br/>
- The given buffer will automatically be increased in size if needed.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/readDataToData:withTimeout:tag:">– readDataToData:withTimeout:tag:</a></code>
- <span class="tooltip"><p>Reads bytes until (and including) the passed “data” parameter, which acts as a separator.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/readDataToData:withTimeout:buffer:bufferOffset:tag:">– readDataToData:withTimeout:buffer:bufferOffset:tag:</a></code>
- <span class="tooltip"><p>Reads bytes until (and including) the passed “data” parameter, which acts as a separator.<br/>
- The bytes will be appended to the given byte buffer starting at the given offset.<br/>
- The given buffer will automatically be increased in size if needed.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/readDataToData:withTimeout:maxLength:tag:">– readDataToData:withTimeout:maxLength:tag:</a></code>
- <span class="tooltip"><p>Reads bytes until (and including) the passed “data” parameter, which acts as a separator.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/readDataToData:withTimeout:buffer:bufferOffset:maxLength:tag:">– readDataToData:withTimeout:buffer:bufferOffset:maxLength:tag:</a></code>
- <span class="tooltip"><p>Reads bytes until (and including) the passed “data” parameter, which acts as a separator.<br/>
- The bytes will be appended to the given byte buffer starting at the given offset.<br/>
- The given buffer will automatically be increased in size if needed.<br/>
- A maximum of length bytes will be read.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/writeData:withTimeout:tag:">– writeData:withTimeout:tag:</a></code>
- <span class="tooltip"><p>Writes data to the socket, and calls the <a href="#//api/name/delegate">delegate</a> when finished.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/progressOfReadReturningTag:bytesDone:total:">– progressOfReadReturningTag:bytesDone:total:</a></code>
- <span class="tooltip"><p>Returns progress of current read or write, from 0.0 to 1.0, or NaN if no read/write (use isnan() to check).<br/>
- “tag”, “done” and “total” will be filled in if they aren’t NULL.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/progressOfWriteReturningTag:bytesDone:total:">– progressOfWriteReturningTag:bytesDone:total:</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/startTLS:">– startTLS:</a></code>
- <span class="tooltip"><p>Secures the connection using SSL/TLS.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/enablePreBuffering">– enablePreBuffering</a></code>
- <span class="tooltip"><p>For handling readDataToData requests, data is necessarily read from the socket in small increments.<br/>
- The performance can be much improved by allowing AsyncSocket to read larger chunks at a time and<br/>
- store any overflow in a small internal buffer.<br/>
- This is termed pre-buffering, as some data may be read for you before you ask for it.<br/>
- If you use readDataToData a lot, enabling pre-buffering will result in better performance, especially on the iPhone.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/moveToRunLoop:">– moveToRunLoop:</a></code>
- <span class="tooltip"><p>When you create an AsyncSocket, it is added to the runloop of the current thread.<br/>
- So for manually created sockets, it is easiest to simply create the socket on the thread you intend to use it.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/setRunLoopModes:">– setRunLoopModes:</a></code>
- <span class="tooltip"><p>Allows you to configure which run loop modes the socket uses.<br/>
- The default set of run loop modes is NSDefaultRunLoopMode.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/addRunLoopMode:">– addRunLoopMode:</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/removeRunLoopMode:">– removeRunLoopMode:</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/runLoopModes">– runLoopModes</a></code>
- <span class="tooltip"><p>Returns the current run loop modes the AsyncSocket instance is operating in.<br/>
- The default set of run loop modes is NSDefaultRunLoopMode.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/unreadData">– unreadData</a></code>
- <span class="tooltip"><p>In the event of an error, this method may be called during onSocket:willDisconnectWithError: to read<br/>
- any data that’s left on the socket.</p></span>
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/CRLFData">+ CRLFData</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/CRData">+ CRData</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/LFData">+ LFData</a></code>
-
- </span>
-
-
- </li><li>
- <span class="tooltip">
- <code><a href="#//api/name/ZeroData">+ ZeroData</a></code>
-
- </span>
-
-
- </li>
- </ul>
-
- </div>
-
-
-
-
-
-
-
- <div class="section section-methods">
- <a title="Class Methods" name="class_methods"></a>
- <h2 class="subtitle subtitle-methods">Class Methods</h2>
-
- <div class="section-method">
- <a name="//api/name/CRData" title="CRData"></a>
- <h3 class="subsubtitle method-title">CRData</h3>
-
-
- <div class="method-subsection method-declaration"><code>+ (NSData *)CRData</code></div>
-
- </div>
-
- <div class="section-method">
- <a name="//api/name/CRLFData" title="CRLFData"></a>
- <h3 class="subsubtitle method-title">CRLFData</h3>
-
-
- <div class="method-subsection method-declaration"><code>+ (NSData *)CRLFData</code></div>
-
- </div>
-
- <div class="section-method">
- <a name="//api/name/LFData" title="LFData"></a>
- <h3 class="subsubtitle method-title">LFData</h3>
-
-
- <div class="method-subsection method-declaration"><code>+ (NSData *)LFData</code></div>
-
- </div>
-
- <div class="section-method">
- <a name="//api/name/ZeroData" title="ZeroData"></a>
- <h3 class="subsubtitle method-title">ZeroData</h3>
-
-
- <div class="method-subsection method-declaration"><code>+ (NSData *)ZeroData</code></div>
-
- </div>
-
- </div>
-
-
-
- <div class="section section-methods">
- <a title="Instance Methods" name="instance_methods"></a>
- <h2 class="subtitle subtitle-methods">Instance Methods</h2>
-
- <div class="section-method">
- <a name="//api/name/acceptOnInterface:port:error:" title="acceptOnInterface:port:error:"></a>
- <h3 class="subsubtitle method-title">acceptOnInterface:port:error:</h3>
-
-
-
- <div class="method-subsection brief-description">
- <p>This method is the same as <a href="#//api/name/acceptOnPort:error:">acceptOnPort:error:</a> with the additional option<br/>
- of specifying which interface to listen on. So, for example, if you were writing code for a server that<br/>
- has multiple IP addresses, you could specify which address you wanted to listen on. Or you could use it<br/>
- to specify that the socket should only accept connections over ethernet, and not other interfaces such as wifi.<br/>
- You may also use the special strings “localhost” or “loopback” to specify that<br/>
- the socket only accept connections from the local machine.</p>
- </div>
-
-
- <div class="method-subsection method-declaration"><code>- (BOOL)acceptOnInterface:(NSString *)<em>interface</em> port:(UInt16)<em>port</em> error:(NSError **)<em>errPtr</em></code></div>
-
-
-
-
-
-
-
-
- <div class="method-subsection discussion-section">
- <h4 class="method-subtitle">Discussion</h4>
- <p>This method is the same as <a href="#//api/name/acceptOnPort:error:">acceptOnPort:error:</a> with the additional option<br/>
- of specifying which interface to listen on. So, for example, if you were writing code for a server that<br/>
- has multiple IP addresses, you could specify which address you wanted to listen on. Or you could use it<br/>
- to specify that the socket should only accept connections over ethernet, and not other interfaces such as wifi.<br/>
- You may also use the special strings “localhost” or “loopback” to specify that<br/>
- the socket only accept connections from the local machine.</p>
- <p>To accept connections on any interface pass nil, or simply use the <a href="#//api/name/acceptOnPort:error:">acceptOnPort:error:</a> method.</p>
- </div>
-
-
-
-
-
-
-
- <div class="method-subsection declared-in-section">
- <h4 class="method-subtitle">Declared In</h4>
- <code class="declared-in-ref">AsyncSocket.h</code><br />
- </div>
-
-
- </div>
-
- <div class="section-method">
- <a name="//api/name/acceptOnPort:error:" title="acceptOnPort:error:"></a>
- <h3 class="subsubtitle method-title">acceptOnPort:error:</h3>
-
-
-
- <div class="method-subsection brief-description">
- <p>Tells the socket to begin listening and accepting connections on the given port.<br/>
- When a connection comes in, the AsyncSocket instance will call the various <a href="#//api/name/delegate">delegate</a> methods (see above).<br/>
- The socket will listen on all available interfaces (e.g. wifi, ethernet, etc)</p>
- </div>
-
-
- <div class="method-subsection method-declaration"><code>- (BOOL)acceptOnPort:(UInt16)<em>port</em> error:(NSError **)<em>errPtr</em></code></div>
-
-
-
-
-
-
-
-
- <div class="method-subsection discussion-section">
- <h4 class="method-subtitle">Discussion</h4>
- <p>Tells the socket to begin listening and accepting connections on the given port.<br/>
- When a connection comes in, the AsyncSocket instance will call the various <a href="#//api/name/delegate">delegate</a> methods (see above).<br/>
- The socket will listen on all available interfaces (e.g. wifi, ethernet, etc)</p>
- </div>
-
-
-
-
-
-
-
- <div class="method-subsection declared-in-section">
- <h4 class="method-subtitle">Declared In</h4>
- <code class="declared-in-ref">AsyncSocket.h</code><br />
- </div>
-
-
- </div>
-
- <div class="section-method">
- <a name="//api/name/addRunLoopMode:" title="addRunLoopMode:"></a>
- <h3 class="subsubtitle method-title">addRunLoopMode:</h3>
-
-
- <div class="method-subsection method-declaration"><code>- (BOOL)addRunLoopMode:(NSString *)<em>runLoopMode</em></code></div>
-
- </div>
-
- <div class="section-method">
- <a name="//api/name/canSafelySetDelegate" title="canSafelySetDelegate"></a>
- <h3 class="subsubtitle method-title">canSafelySetDelegate</h3>
-
-
- <div class="method-subsection method-declaration"><code>- (BOOL)canSafelySetDelegate</code></div>
-
- </div>
-
- <div class="section-method">
- <a name="//api/name/connectToAddress:error:" title="connectToAddress:error:"></a>
- <h3 class="subsubtitle method-title">connectToAddress:error:</h3>
-
-
-
- <div class="method-subsection brief-description">
- <p>Connects to the given address, specified as a sockaddr structure wrapped in a NSData object.<br/>
- For example, a NSData object returned from NSNetService’s addresses method.</p>
- </div>
-
-
- <div class="method-subsection method-declaration"><code>- (BOOL)connectToAddress:(NSData *)<em>remoteAddr</em> error:(NSError **)<em>errPtr</em></code></div>
-
-
-
-
-
-
-
-
- <div class="method-subsection discussion-section">
- <h4 class="method-subtitle">Discussion</h4>
- <p>Connects to the given address, specified as a sockaddr structure wrapped in a NSData object.<br/>
- For example, a NSData object returned from NSNetService’s addresses method.</p>
- <p>If you have an existing struct sockaddr you can convert it to a NSData object like so:<br/>
- struct sockaddr sa -> NSData <em>dsa = [NSData dataWithBytes:&remoteAddr length:remoteAddr.sa_len];<br/>
- struct sockaddr </em>sa -> NSData *dsa = [NSData dataWithBytes:remoteAddr length:remoteAddr->sa_len];</p>
- </div>
-
-
-
-
-
-
-
- <div class="method-subsection declared-in-section">
- <h4 class="method-subtitle">Declared In</h4>
- <code class="declared-in-ref">AsyncSocket.h</code><br />
- </div>
-
-
- </div>
-
- <div class="section-method">
- <a name="//api/name/connectToAddress:viaInterfaceAddress:withTimeout:error:" title="connectToAddress:viaInterfaceAddress:withTimeout:error:"></a>
- <h3 class="subsubtitle method-title">connectToAddress:viaInterfaceAddress:withTimeout:error:</h3>
-
-
- <div class="method-subsection method-declaration"><code>- (BOOL)connectToAddress:(NSData *)<em>remoteAddr</em> viaInterfaceAddress:(NSData *)<em>interfaceAddr</em> withTimeout:(NSTimeInterval)<em>timeout</em> error:(NSError **)<em>errPtr</em></code></div>
-
- </div>
-
- <div class="section-method">
- <a name="//api/name/connectToAddress:withTimeout:error:" title="connectToAddress:withTimeout:error:"></a>
- <h3 class="subsubtitle method-title">connectToAddress:withTimeout:error:</h3>
-
-
-
- <div class="method-subsection brief-description">
- <p>This method is the same as <a href="#//api/name/connectToAddress:error:">connectToAddress:error:</a> with an additional timeout option.<br/>
- To not time out use a negative time interval, or simply use the <a href="#//api/name/connectToAddress:error:">connectToAddress:error:</a> method.</p>
- </div>
-
-
- <div class="method-subsection method-declaration"><code>- (BOOL)connectToAddress:(NSData *)<em>remoteAddr</em> withTimeout:(NSTimeInterval)<em>timeout</em> error:(NSError **)<em>errPtr</em></code></div>
-
-
-
-
-
-
-
-
- <div class="method-subsection discussion-section">
- <h4 class="method-subtitle">Discussion</h4>
- <p>This method is the same as <a href="#//api/name/connectToAddress:error:">connectToAddress:error:</a> with an additional timeout option.<br/>
- To not time out use a negative time interval, or simply use the <a href="#//api/name/connectToAddress:error:">connectToAddress:error:</a> method.</p>
- </div>
-
-
-
-
-
-
-
- <div class="method-subsection declared-in-section">
- <h4 class="method-subtitle">Declared In</h4>
- <code class="declared-in-ref">AsyncSocket.h</code><br />
- </div>
-
-
- </div>
-
- <div class="section-method">
- <a name="//api/name/connectToHost:onPort:error:" title="connectToHost:onPort:error:"></a>
- <h3 class="subsubtitle method-title">connectToHost:onPort:error:</h3>
-
-
-
- <div class="method-subsection brief-description">
- <p>Connects to the given host and port.<br/>
- The host may be a domain name (e.g. “deusty.com”) or an IP address string (e.g. “192.168.0.2”)</p>
- </div>
-
-
- <div class="method-subsection method-declaration"><code>- (BOOL)connectToHost:(NSString *)<em>hostname</em> onPort:(UInt16)<em>port</em> error:(NSError **)<em>errPtr</em></code></div>
-
-
-
-
-
-
-
-
- <div class="method-subsection discussion-section">
- <h4 class="method-subtitle">Discussion</h4>
- <p>Connects to the given host and port.<br/>
- The host may be a domain name (e.g. “deusty.com”) or an IP address string (e.g. “192.168.0.2”)</p>
- </div>
-
-
-
-
-
-
-
- <div class="method-subsection declared-in-section">
- <h4 class="method-subtitle">Declared In</h4>
- <code class="declared-in-ref">AsyncSocket.h</code><br />
- </div>
-
-
- </div>
-
- <div class="section-method">
- <a name="//api/name/connectToHost:onPort:withTimeout:error:" title="connectToHost:onPort:withTimeout:error:"></a>
- <h3 class="subsubtitle method-title">connectToHost:onPort:withTimeout:error:</h3>
-
-
-
- <div class="method-subsection brief-description">
- <p>This method is the same as <a href="#//api/name/connectToHost:onPort:error:">connectToHost:onPort:error:</a> with an additional timeout option.<br/>
- To not time out use a negative time interval, or simply use the <a href="#//api/name/connectToHost:onPort:error:">connectToHost:onPort:error:</a> method.</p>
- </div>
-
-
- <div class="method-subsection method-declaration"><code>- (BOOL)connectToHost:(NSString *)<em>hostname</em> onPort:(UInt16)<em>port</em> withTimeout:(NSTimeInterval)<em>timeout</em> error:(NSError **)<em>errPtr</em></code></div>
-
-
-
-
-
-
-
-
- <div class="method-subsection discussion-section">
- <h4 class="method-subtitle">Discussion</h4>
- <p>This method is the same as <a href="#//api/name/connectToHost:onPort:error:">connectToHost:onPort:error:</a> with an additional timeout option.<br/>
- To not time out use a negative time interval, or simply use the <a href="#//api/name/connectToHost:onPort:error:">connectToHost:onPort:error:</a> method.</p>
- </div>
-
-
-
-
-
-
-
- <div class="method-subsection declared-in-section">
- <h4 class="method-subtitle">Declared In</h4>
- <code class="declared-in-ref">AsyncSocket.h</code><br />
- </div>
-
-
- </div>
-
- <div class="section-method">
- <a name="//api/name/connectedAddress" title="connectedAddress"></a>
- <h3 class="subsubtitle method-title">connectedAddress</h3>
-
-
-
- <div class="method-subsection brief-description">
- <p>Returns the local or remote address to which this socket is connected,<br/>
- specified as a sockaddr structure wrapped in a NSData object.</p>
- </div>
-
-
- <div class="method-subsection method-declaration"><code>- (NSData *)connectedAddress</code></div>
-
-
-
-
-
-
-
-
- <div class="method-subsection discussion-section">
- <h4 class="method-subtitle">Discussion</h4>
- <p>Returns the local or remote address to which this socket is connected,<br/>
- specified as a sockaddr structure wrapped in a NSData object.</p>
- <p>See also the <a href="#//api/name/connectedHost">connectedHost</a>, <a href="#//api/name/connectedPort">connectedPort</a>, <a href="#//api/name/localHost">localHost</a> and <a href="#//api/name/localPort">localPort</a> methods.</p>
- </div>
-
-
-
-
-
-
-
- <div class="method-subsection declared-in-section">
- <h4 class="method-subtitle">Declared In</h4>
- <code class="declared-in-ref">AsyncSocket.h</code><br />
- </div>
-
-
- </div>
-
- <div class="section-method">
- <a name="//api/name/connectedHost" title="connectedHost"></a>
- <h3 class="subsubtitle method-title">connectedHost</h3>
-
-
-
- <div class="method-subsection brief-description">
- <p>Returns the local or remote host and port to which this socket is connected, or nil and 0 if not connected.<br/>
- The host will be an IP address.</p>
- </div>
-
-
- <div class="method-subsection method-declaration"><code>- (NSString *)connectedHost</code></div>
-
-
-
-
-
-
-
-
- <div class="method-subsection discussion-section">
- <h4 class="method-subtitle">Discussion</h4>
- <p>Returns the local or remote host and port to which this socket is connected, or nil and 0 if not connected.<br/>
- The host will be an IP address.</p>
- </div>
-
-
-
-
-
-
-
- <div class="method-subsection declared-in-section">
- <h4 class="method-subtitle">Declared In</h4>
- <code class="declared-in-ref">AsyncSocket.h</code><br />
- </div>
-
-
- </div>
-
- <div class="section-method">
- <a name="//api/name/connectedPort" title="connectedPort"></a>
- <h3 class="subsubtitle method-title">connectedPort</h3>
-
-
- <div class="method-subsection method-declaration"><code>- (UInt16)connectedPort</code></div>
-
- </div>
-
- <div class="section-method">
- <a name="//api/name/delegate" title="delegate"></a>
- <h3 class="subsubtitle method-title">delegate</h3>
-
-
-
- <div class="method-subsection brief-description">
- <p>Use “canSafelySetDelegate” to see if there is any pending business (reads and writes) with the current delegate<br/>
- before changing it. It is, of course, safe to change the delegate before connecting or accepting connections.</p>
- </div>
-
-
- <div class="method-subsection method-declaration"><code>- (id)delegate</code></div>
-
-
-
-
-
-
-
-
- <div class="method-subsection discussion-section">
- <h4 class="method-subtitle">Discussion</h4>
- <p>Use “canSafelySetDelegate” to see if there is any pending business (reads and writes) with the current delegate<br/>
- before changing it. It is, of course, safe to change the delegate before connecting or accepting connections.</p>
- </div>
-
-
-
-
-
-
-
- <div class="method-subsection declared-in-section">
- <h4 class="method-subtitle">Declared In</h4>
- <code class="declared-in-ref">AsyncSocket.h</code><br />
- </div>
-
-
- </div>
-
- <div class="section-method">
- <a name="//api/name/description" title="description"></a>
- <h3 class="subsubtitle method-title">description</h3>
-
-
- <div class="method-subsection method-declaration"><code>- (NSString *)description</code></div>
-
- </div>
-
- <div class="section-method">
- <a name="//api/name/disconnect" title="disconnect"></a>
- <h3 class="subsubtitle method-title">disconnect</h3>
-
-
-
- <div class="method-subsection brief-description">
- <p>Disconnects immediately. Any pending reads or writes are dropped.<br/>
- If the socket is not already disconnected, the onSocketDidDisconnect <a href="#//api/name/delegate">delegate</a> method<br/>
- will be called immediately, before this method returns.</p>
- </div>
-
-
- <div class="method-subsection method-declaration"><code>- (void)disconnect</code></div>
-
-
-
-
-
-
-
-
- <div class="method-subsection discussion-section">
- <h4 class="method-subtitle">Discussion</h4>
- <p>Disconnects immediately. Any pending reads or writes are dropped.<br/>
- If the socket is not already disconnected, the onSocketDidDisconnect delegate method<br/>
- will be called immediately, before this method returns.</p>
- <p>Please note the recommended way of releasing an AsyncSocket instance (e.g. in a dealloc method)<br/>
- [asyncSocket setDelegate:nil];<br/>
- [asyncSocket disconnect];<br/>…
Large files files are truncated, but you can click here to view the full file