diff options
author | Jonathan Ballet <jon@multani.info> | 2011-07-16 07:09:15 +0900 |
---|---|---|
committer | Jonathan Ballet <jon@multani.info> | 2011-07-16 07:09:15 +0900 |
commit | b25309110c511231ce751d0a54b991d5ba7227d2 (patch) | |
tree | bf47e938a82a0263b21cf63696e807e78afa602d /doc/html/socket-methods.html | |
parent | 042b66d4834b493ff82c9f2dc16aca09f39c9d8a (diff) | |
download | pyopenssl-b25309110c511231ce751d0a54b991d5ba7227d2.tar.gz |
Move the old documentation direcctory to prepare the new one.
Diffstat (limited to 'doc/html/socket-methods.html')
-rw-r--r-- | doc/html/socket-methods.html | 119 |
1 files changed, 0 insertions, 119 deletions
diff --git a/doc/html/socket-methods.html b/doc/html/socket-methods.html deleted file mode 100644 index 46ecc01..0000000 --- a/doc/html/socket-methods.html +++ /dev/null @@ -1,119 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html> -<head> -<title>4.3 Acessing Socket Methods </title> -<META NAME="description" CONTENT="4.3 Acessing Socket Methods "> -<META NAME="keywords" CONTENT="pyOpenSSL"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<link rel="STYLESHEET" href="pyOpenSSL.css"> -<LINK REL="previous" href="callbacks.html"> -<LINK REL="up" href="internals.html"> -<LINK REL="next" href="about.html"> -</head> -<body> -<DIV CLASS="navigation"> -<table align="center" width="100%" cellpadding="0" cellspacing="2"> -<tr> -<td><A href="callbacks.html"><img src="previous.gif" - border="0" height="32" - alt="Previous Page" width="32"></A></td> -<td><A href="internals.html"><img src="up.gif" - border="0" height="32" - alt="Up One Level" width="32"></A></td> -<td><A href="about.html"><img src="next.gif" - border="0" height="32" - alt="Next Page" width="32"></A></td> -<td align="center" width="100%">Python OpenSSL Manual</td> -<td><A href="contents.html"><img src="contents.gif" - border="0" height="32" - alt="Contents" width="32"></A></td> -<td><img src="blank.gif" - border="0" height="32" - alt="" width="32"></td> -<td><img src="blank.gif" - border="0" height="32" - alt="" width="32"></td> -</tr></table> -<b class="navlabel">Previous:</b> <a class="sectref" href="callbacks.html">4.2 Callbacks</A> -<b class="navlabel">Up:</b> <a class="sectref" href="internals.html">4 Internals</A> -<b class="navlabel">Next:</b> <a class="sectref" href="about.html">About this document ...</A> -<br><hr> -</DIV> -<!--End of Navigation Panel--> - -<H2><A NAME="SECTION000530000000000000000"> </A> -<BR> -4.3 Acessing Socket Methods -</H2> - -<P> -We quickly saw the benefit of wrapping socket methods in the -<tt class="class">SSL.Connection</tt> class, for an easy transition into using SSL. The -problem here is that the <tt class="module">socket</tt> module lacks a C API, and all the -methods are declared static. One approach would be to have <tt class="module">OpenSSL</tt> as -a submodule to the <tt class="module">socket</tt> module, placing all the code in -<span class="file">socketmodule.c</span>, but this is obviously not a good solution, since you -might not want to import tonnes of extra stuff you're not going to use when -importing the <tt class="module">socket</tt> module. The other approach is to somehow get a -pointer to the method to be called, either the C function, or a callable Python -object. This is not really a good solution either, since there's a lot of -lookups involved. - -<P> -The way it works is that you have to supply a ``<tt class="class">socket</tt>-like'' transport -object to the <tt class="class">SSL.Connection</tt>. The only requirement of this object is -that it has a <tt class="method">fileno()</tt> method that returns a file descriptor that's -valid at the C level (i.e. you can use the system calls read and write). If you -want to use the <tt class="method">connect()</tt> or <tt class="method">accept()</tt> methods of the -<tt class="class">SSL.Connection</tt> object, the transport object has to supply such -methods too. Apart from them, any method lookups in the <tt class="class">SSL.Connection</tt> -object that fail are passed on to the underlying transport object. - -<P> -Future changes might be to allow Python-level transport objects, that instead -of having <tt class="method">fileno()</tt> methods, have <tt class="method">read()</tt> and <tt class="method">write()</tt> -methods, so more advanced features of Python can be used. This would probably -entail some sort of OpenSSL ``BIOs'', but converting Python strings back and -forth is expensive, so this shouldn't be used unless necessary. Other nice -things would be to be able to pass in different transport objects for reading -and writing, but then the <tt class="method">fileno()</tt> method of <tt class="class">SSL.Connection</tt> -becomes virtually useless. Also, should the method resolution be used on the -read-transport or the write-transport? - -<P> - -<DIV CLASS="navigation"> -<p><hr> -<table align="center" width="100%" cellpadding="0" cellspacing="2"> -<tr> -<td><A href="callbacks.html"><img src="previous.gif" - border="0" height="32" - alt="Previous Page" width="32"></A></td> -<td><A href="internals.html"><img src="up.gif" - border="0" height="32" - alt="Up One Level" width="32"></A></td> -<td><A href="about.html"><img src="next.gif" - border="0" height="32" - alt="Next Page" width="32"></A></td> -<td align="center" width="100%">Python OpenSSL Manual</td> -<td><A href="contents.html"><img src="contents.gif" - border="0" height="32" - alt="Contents" width="32"></A></td> -<td><img src="blank.gif" - border="0" height="32" - alt="" width="32"></td> -<td><img src="blank.gif" - border="0" height="32" - alt="" width="32"></td> -</tr></table> -<b class="navlabel">Previous:</b> <a class="sectref" href="callbacks.html">4.2 Callbacks</A> -<b class="navlabel">Up:</b> <a class="sectref" href="internals.html">4 Internals</A> -<b class="navlabel">Next:</b> <a class="sectref" href="about.html">About this document ...</A> -<hr> -<span class="release-info">Release 0.12.</span> -</DIV> -<!--End of Navigation Panel--> - -</BODY> -</HTML> |