diff --git a/doc/conch/examples/index.xhtml b/doc/conch/examples/index.xhtml
index 6b1dec6..08ec66e 100644
|
a
|
b
|
|
| 12 | 12 | |
| 13 | 13 | <h2>Simple SSH server and client</h2> |
| 14 | 14 | <ul> |
| 15 | | <li><a href="sshsimpleclient.py">sshsimpleclient.py</a></li> |
| 16 | | <li><a href="sshsimpleserver.py">sshsimpleserver.py</a></li> |
| | 15 | <li><a href="sshsimpleclient.py">sshsimpleclient.py</a> - simple SSH client</li> |
| | 16 | <li><a href="sshsimpleserver.py">sshsimpleserver.py</a> - simple SSH server</li> |
| 17 | 17 | </ul> |
| 18 | 18 | |
| 19 | 19 | <h2>Simple telnet server</h2> |
| 20 | 20 | <ul> |
| 21 | | <li><a href="telnet_echo.tac">A telnet server which echoes data and events back to the client</a></li> |
| | 21 | <li><a href="telnet_echo.tac">telnet_echo.tac</a> - A telnet server which echoes data and events back to the client</li> |
| 22 | 22 | </ul> |
| 23 | 23 | |
| 24 | 24 | |
| 25 | 25 | <h2>twisted.conch.insults examples</h2> |
| 26 | 26 | <ul> |
| 27 | | <li><a href="demo.tac">demo.tac</a> Nearly pointless demonstration of the manhole interactive interpreter</li> |
| 28 | | <li><a href="demo_draw.tac">demo_draw.tac</a> A trivial drawing application</li> |
| 29 | | <li><a href="demo_insults.tac">demo_insults.tac</a> Various simple terminal manipulations using the insults module</li> |
| 30 | | <li><a href="demo_recvline.tac">demo_recvline.tac</a> Demonstrates line-at-a-time handling with basic line-editing support</li> |
| 31 | | <li><a href="demo_scroll.tac">demo_scroll.tac</a> Simple echo-ish server that uses the scroll-region</li> |
| 32 | | <li><a href="demo_manhole.tac">demo_manhole.tac</a> An interactive Python interpreter with syntax coloring</li> |
| 33 | | <li><a href="window.tac">window.tac</a> An example of various widgets</li> |
| | 27 | <li><a href="demo.tac">demo.tac</a> - Nearly pointless demonstration of the manhole interactive interpreter</li> |
| | 28 | <li><a href="demo_draw.tac">demo_draw.tac</a> - A trivial drawing application</li> |
| | 29 | <li><a href="demo_insults.tac">demo_insults.tac</a> - Various simple terminal manipulations using the insults module</li> |
| | 30 | <li><a href="demo_recvline.tac">demo_recvline.tac</a> - Demonstrates line-at-a-time handling with basic line-editing support</li> |
| | 31 | <li><a href="demo_scroll.tac">demo_scroll.tac</a> - Simple echo-ish server that uses the scroll-region</li> |
| | 32 | <li><a href="demo_manhole.tac">demo_manhole.tac</a> - An interactive Python interpreter with syntax coloring</li> |
| | 33 | <li><a href="window.tac">window.tac</a> - An example of various widgets</li> |
| 34 | 34 | </ul> |
| 35 | 35 | </body> |
| 36 | 36 | </html> |
diff --git a/doc/conch/howto/conch_client.xhtml b/doc/conch/howto/conch_client.xhtml
index 25d0980..80b7b0c 100644
|
a
|
b
|
|
| 129 | 129 | for input.</p> |
| 130 | 130 | |
| 131 | 131 | <p>Once the authentication is complete, <code |
| 132 | | class="python">SSHUserAuthClient</code> takes care of starting the code |
| | 132 | class="python">SSHUserAuthClient</code> takes care of starting the code |
| 133 | 133 | <code class="python">SSHConnection</code> object given to it. Next, we'll |
| 134 | 134 | look at how to use the <code class="python">SSHConnection</code></p> |
| 135 | 135 | |
| … |
… |
|
| 187 | 187 | where everything gets started. It gets passed a chunk of data; |
| 188 | 188 | however, this chunk is usually nothing and can be ignored. |
| 189 | 189 | Our <code class="python">channelOpen()</code> initializes our |
| 190 | | channel, and sends a request to the other side, using the |
| | 190 | channel, and sends a request to the other side, using the |
| 191 | 191 | <code class="python">sendRequest()</code> method of the <code |
| 192 | 192 | class="python">SSHConnection</code> object. Requests are used to send |
| 193 | 193 | events to the other side. We pass the method self so that it knows to |
| 194 | 194 | send the request for this channel. The 2nd argument of 'exec' tells the |
| 195 | 195 | server that we want to execute a command. The third argument is the data |
| 196 | | that accompanies the request. <code class="API">common.NS</code> encodes |
| | 196 | that accompanies the request. |
| | 197 | <code class="API" base="twisted.conch.ssh">common.NS</code> encodes |
| 197 | 198 | the data as a length-prefixed string, which is how the server expects |
| 198 | 199 | the data. We also say that we want a reply saying that the process has a |
| 199 | | been started. <code class="python">sendRequest()</code> then returns a |
| | 200 | been started. <code class="python">sendRequest()</code> then returns a |
| 200 | 201 | <code class="python">Deferred</code> which we add a callback for.</p> |
| 201 | 202 | |
| 202 | 203 | <p>Once the callback fires, we send the data. <code |
| 203 | | class="python">SSHChannel</code> supports the <code class="API"> |
| 204 | | twisted.internet.interface.Transport</code> interface, so |
| | 204 | class="python">SSHChannel</code> supports the |
| | 205 | <code class="API">twisted.internet.interfaces.ITransport</code> |
| | 206 | interface, so |
| 205 | 207 | it can be given to Protocols to run them over the secure |
| 206 | 208 | connection. In our case, we just write the data directly. <code |
| 207 | 209 | class="python">sendEOF()</code> does not follow the interface, |
| … |
… |
|
| 235 | 237 | This instance has the attribute <code class="python">protocol</code> |
| 236 | 238 | set to our earlier <code class="python">ClientTransport</code> |
| 237 | 239 | class. Note that the protocol attribute is set to the class <code |
| 238 | | class="python">ClientTransport</code>, not an instance of |
| | 240 | class="python">ClientTransport</code>, not an instance of |
| 239 | 241 | <code class="python">ClientTransport</code>! When the <code |
| 240 | 242 | class="python">connectTCP</code> call completes, the protocol will be |
| 241 | 243 | called to create a <code class="python">ClientTransport()</code> object |