~ubuntu-branches/ubuntu/gutsy/libapache2-mod-python/gutsy

« back to all changes in this revision

Viewing changes to doc-html/pyapi-mpconn-meth.html

  • Committer: Bazaar Package Importer
  • Author(s): Piotr Ożarowski
  • Date: 2007-04-12 20:52:05 UTC
  • mfrom: (1.2.4 upstream) (1.1.2 etch)
  • Revision ID: james.westby@ubuntu.com-20070412205205-j4qlsw3o4tl615iq
Tags: 3.3.1-1
* New upstream release
* Remove configure and mod_python.h files in clean rule to make the diff.gz
  file smaller
* Current Python version in libapache2-mod-pythonX.Y package name (Provides:
  field) filled in automatically.
* Added XS-Vcs-Browser field

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
2
<html>
3
3
<head>
4
 
<link rel="STYLESHEET" href="modpython.css" type='text/css'>
5
 
<link rel="first" href="modpython.html" title='Mod_python Manual'>
6
 
<link rel='contents' href='contents.html' title="Contents">
7
 
<link rel='index' href='genindex.html' title='Index'>
8
 
<link rel='last' href='about.html' title='About this document...'>
9
 
<link rel='help' href='about.html' title='About this document...'>
10
 
<LINK REL="next" href="pyapi-mpconn-mem.html">
11
 
<LINK REL="prev" href="pyapi-mpconn.html">
12
 
<LINK REL="parent" href="pyapi-mpconn.html">
13
 
<LINK REL="next" href="pyapi-mpconn-mem.html">
14
 
<meta name='aesop' content='information'>
15
 
<META NAME="description" CONTENT="Connection Methods">
16
 
<META NAME="keywords" CONTENT="modpython">
17
 
<META NAME="resource-type" CONTENT="document">
18
 
<META NAME="distribution" CONTENT="global">
19
 
<title>4.5.4.1 Connection Methods</title>
 
4
<link rel="STYLESHEET" href="modpython.css" type='text/css' />
 
5
<link rel="first" href="modpython.html" title='Mod_python Manual' />
 
6
<link rel='contents' href='contents.html' title="Contents" />
 
7
<link rel='index' href='genindex.html' title='Index' />
 
8
<link rel='last' href='about.html' title='About this document...' />
 
9
<link rel='help' href='about.html' title='About this document...' />
 
10
<link rel="next" href="pyapi-mpconn-mem.html" />
 
11
<link rel="prev" href="pyapi-mpconn.html" />
 
12
<link rel="parent" href="pyapi-mpconn.html" />
 
13
<link rel="next" href="pyapi-mpconn-mem.html" />
 
14
<meta name='aesop' content='information' />
 
15
<title>4.5.5.1 Connection Methods</title>
20
16
</head>
21
17
<body>
22
18
<DIV CLASS="navigation">
 
19
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
23
20
<table align="center" width="100%" cellpadding="0" cellspacing="2">
24
21
<tr>
25
 
<td><a rel="prev" title="4.5.4 Connection Object (mp_conn)&nbsp;" 
26
 
  href="pyapi-mpconn.html"><img src='previous.gif'
27
 
  border='0' height='32'  alt='Previous Page' width='32'></A></td>
28
 
<td><a rel="parent" title="4.5.4 Connection Object (mp_conn)&nbsp;" 
29
 
  href="pyapi-mpconn.html"><img src='up.gif'
30
 
  border='0' height='32'  alt='Up One Level' width='32'></A></td>
31
 
<td><a rel="next" title="4.5.4.2 Connection Members" 
32
 
  href="pyapi-mpconn-mem.html"><img src='next.gif'
33
 
  border='0' height='32'  alt='Next Page' width='32'></A></td>
 
22
<td class='online-navigation'><a rel="prev" title="4.5.5 Connection Object (mp_conn)"
 
23
  href="pyapi-mpconn.html"><img src='previous.png'
 
24
  border='0' height='32'  alt='Previous Page' width='32' /></A></td>
 
25
<td class='online-navigation'><a rel="parent" title="4.5.5 Connection Object (mp_conn)"
 
26
  href="pyapi-mpconn.html"><img src='up.png'
 
27
  border='0' height='32'  alt='Up One Level' width='32' /></A></td>
 
28
<td class='online-navigation'><a rel="next" title="4.5.5.2 Connection Members"
 
29
  href="pyapi-mpconn-mem.html"><img src='next.png'
 
30
  border='0' height='32'  alt='Next Page' width='32' /></A></td>
34
31
<td align="center" width="100%">Mod_python Manual</td>
35
 
<td><a rel="contents" title="Table of Contents" 
36
 
  href="contents.html"><img src='contents.gif'
37
 
  border='0' height='32'  alt='Contents' width='32'></A></td>
38
 
<td><img src='blank.gif'
39
 
  border='0' height='32'  alt='' width='32'></td>
40
 
<td><a rel="index" title="Index" 
41
 
  href="genindex.html"><img src='index.gif'
42
 
  border='0' height='32'  alt='Index' width='32'></A></td>
 
32
<td class='online-navigation'><a rel="contents" title="Table of Contents"
 
33
  href="contents.html"><img src='contents.png'
 
34
  border='0' height='32'  alt='Contents' width='32' /></A></td>
 
35
<td class='online-navigation'><img src='blank.png'
 
36
  border='0' height='32'  alt='' width='32' /></td>
 
37
<td class='online-navigation'><a rel="index" title="Index"
 
38
  href="genindex.html"><img src='index.png'
 
39
  border='0' height='32'  alt='Index' width='32' /></A></td>
43
40
</tr></table>
 
41
<div class='online-navigation'>
44
42
<b class="navlabel">Previous:</b>
45
 
<a class="sectref" rel="prev" href="pyapi-mpconn.html">4.5.4 Connection Object (mp_conn)&nbsp;</A>
 
43
<a class="sectref" rel="prev" href="pyapi-mpconn.html">4.5.5 Connection Object (mp_conn)</A>
46
44
<b class="navlabel">Up:</b>
47
 
<a class="sectref" rel="parent" href="pyapi-mpconn.html">4.5.4 Connection Object (mp_conn)&nbsp;</A>
 
45
<a class="sectref" rel="parent" href="pyapi-mpconn.html">4.5.5 Connection Object (mp_conn)</A>
48
46
<b class="navlabel">Next:</b>
49
 
<a class="sectref" rel="next" href="pyapi-mpconn-mem.html">4.5.4.2 Connection Members</A>
50
 
<br><hr>
 
47
<a class="sectref" rel="next" href="pyapi-mpconn-mem.html">4.5.5.2 Connection Members</A>
 
48
</div>
 
49
<hr /></div>
51
50
</DIV>
52
51
<!--End of Navigation Panel-->
53
52
 
54
 
<H3><A NAME="SECTION006541000000000000000">&nbsp;</A>
 
53
<H3><A NAME="SECTION006551000000000000000"></A><A NAME="pyapi-mpconn-meth"></A>
55
54
<BR>
56
 
4.5.4.1 Connection Methods
 
55
4.5.5.1 Connection Methods
57
56
</H3>
58
57
 
59
58
<P>
60
59
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
61
 
  <td><nobr><b><a name="l2h-131"><tt class="method">read</tt></a></b>(</nobr></td>
62
 
  <td><big>[</big><var>length</var><big>]</big>)</td></tr></table>
 
60
  <td><nobr><b><tt id='l2h-145' xml:id='l2h-145' class="method">log_error</tt></b>(</nobr></td>
 
61
  <td><var>message</var><big>[</big><var>, level</var><big>]</big><var></var>)</td></tr></table></dt>
 
62
<dd>
 
63
  An interface to the Apache <code>ap_log_cerror</code>
 
64
  function. <var>message</var> is a string with the error message,
 
65
  <var>level</var> is one of the following flags constants:
 
66
 
 
67
<P>
 
68
<div class="verbatim"><pre>
 
69
    APLOG_EMERG
 
70
    APLOG_ALERT
 
71
    APLOG_CRIT
 
72
    APLOG_ERR
 
73
    APLOG_WARNING
 
74
    APLOG_NOTICE
 
75
    APLOG_INFO
 
76
    APLOG_DEBUG
 
77
    APLOG_NOERRNO
 
78
</pre></div>            
 
79
 
 
80
<P>
 
81
If you need to write to log and do not have a reference to a connection or
 
82
  request object, use the <tt class="function">apache.log_error</tt> function.
 
83
</dl>
 
84
 
 
85
<P>
 
86
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
 
87
  <td><nobr><b><tt id='l2h-146' xml:id='l2h-146' class="method">read</tt></b>(</nobr></td>
 
88
  <td><var></var><big>[</big><var>length</var><big>]</big><var></var>)</td></tr></table></dt>
63
89
<dd>
64
90
  Reads at most <var>length</var> bytes from the client. The read blocks
65
91
  indefinitely until there is at least one byte to read. If length is
67
93
  is known as <code>EXHAUSTIVE</code> mode in the http server code).
68
94
 
69
95
<P>
70
 
This method should only be used inside <i>Connection Handlers</i>.
 
96
This method should only be used inside <em>Connection Handlers</em>.
71
97
 
72
98
<P>
73
99
<div class="note"><b class="label">Note:</b>
81
107
 
82
108
<P>
83
109
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
84
 
  <td><nobr><b><a name="l2h-132"><tt class="method">readline</tt></a></b>(</nobr></td>
85
 
  <td><big>[</big><var>length</var><big>]</big>)</td></tr></table>
 
110
  <td><nobr><b><tt id='l2h-147' xml:id='l2h-147' class="method">readline</tt></b>(</nobr></td>
 
111
  <td><var></var><big>[</big><var>length</var><big>]</big><var></var>)</td></tr></table></dt>
86
112
<dd>
87
113
 
88
114
<P>
89
115
Reads a line from the connection or up to <var>length</var> bytes.
90
116
 
91
117
<P>
92
 
This method should only be used inside <i>Connection Handlers</i>.
 
118
This method should only be used inside <em>Connection Handlers</em>.
93
119
 
94
120
<P>
95
121
</dl>
96
122
 
97
123
<P>
98
124
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
99
 
  <td><nobr><b><a name="l2h-133"><tt class="method">write</tt></a></b>(</nobr></td>
100
 
  <td><var>string</var>)</td></tr></table>
 
125
  <td><nobr><b><tt id='l2h-148' xml:id='l2h-148' class="method">write</tt></b>(</nobr></td>
 
126
  <td><var>string</var>)</td></tr></table></dt>
101
127
<dd>
102
128
 
103
129
<P>
104
130
Writes <var>string</var> to the client.
105
131
 
106
132
<P>
107
 
This method should only be used inside <i>Connection Handlers</i>.
 
133
This method should only be used inside <em>Connection Handlers</em>.
108
134
 
109
135
<P>
110
136
</dl>
112
138
<P>
113
139
 
114
140
<DIV CLASS="navigation">
115
 
<p><hr>
 
141
<div class='online-navigation'>
 
142
<p></p><hr />
116
143
<table align="center" width="100%" cellpadding="0" cellspacing="2">
117
144
<tr>
118
 
<td><a rel="prev" title="4.5.4 Connection Object (mp_conn)&nbsp;" 
119
 
  rel="prev" title="4.5.4 Connection Object (mp_conn)&nbsp;" 
120
 
  href="pyapi-mpconn.html"><img src='previous.gif'
121
 
  border='0' height='32'  alt='Previous Page' width='32'></A></td>
122
 
<td><a rel="parent" title="4.5.4 Connection Object (mp_conn)&nbsp;" 
123
 
  rel="parent" title="4.5.4 Connection Object (mp_conn)&nbsp;" 
124
 
  href="pyapi-mpconn.html"><img src='up.gif'
125
 
  border='0' height='32'  alt='Up One Level' width='32'></A></td>
126
 
<td><a rel="next" title="4.5.4.2 Connection Members" 
127
 
  rel="next" title="4.5.4.2 Connection Members" 
128
 
  href="pyapi-mpconn-mem.html"><img src='next.gif'
129
 
  border='0' height='32'  alt='Next Page' width='32'></A></td>
 
145
<td class='online-navigation'><a rel="prev" title="4.5.5 Connection Object (mp_conn)"
 
146
  href="pyapi-mpconn.html"><img src='previous.png'
 
147
  border='0' height='32'  alt='Previous Page' width='32' /></A></td>
 
148
<td class='online-navigation'><a rel="parent" title="4.5.5 Connection Object (mp_conn)"
 
149
  href="pyapi-mpconn.html"><img src='up.png'
 
150
  border='0' height='32'  alt='Up One Level' width='32' /></A></td>
 
151
<td class='online-navigation'><a rel="next" title="4.5.5.2 Connection Members"
 
152
  href="pyapi-mpconn-mem.html"><img src='next.png'
 
153
  border='0' height='32'  alt='Next Page' width='32' /></A></td>
130
154
<td align="center" width="100%">Mod_python Manual</td>
131
 
<td><a rel="contents" title="Table of Contents" 
132
 
  rel="contents" title="Table of Contents" 
133
 
  href="contents.html"><img src='contents.gif'
134
 
  border='0' height='32'  alt='Contents' width='32'></A></td>
135
 
<td><img src='blank.gif'
136
 
  border='0' height='32'  alt='' width='32'></td>
137
 
<td><a rel="index" title="Index" 
138
 
  rel="index" title="Index" 
139
 
  href="genindex.html"><img src='index.gif'
140
 
  border='0' height='32'  alt='Index' width='32'></A></td>
 
155
<td class='online-navigation'><a rel="contents" title="Table of Contents"
 
156
  href="contents.html"><img src='contents.png'
 
157
  border='0' height='32'  alt='Contents' width='32' /></A></td>
 
158
<td class='online-navigation'><img src='blank.png'
 
159
  border='0' height='32'  alt='' width='32' /></td>
 
160
<td class='online-navigation'><a rel="index" title="Index"
 
161
  href="genindex.html"><img src='index.png'
 
162
  border='0' height='32'  alt='Index' width='32' /></A></td>
141
163
</tr></table>
 
164
<div class='online-navigation'>
142
165
<b class="navlabel">Previous:</b>
143
 
<a class="sectref" rel="prev" href="pyapi-mpconn.html">4.5.4 Connection Object (mp_conn)&nbsp;</A>
 
166
<a class="sectref" rel="prev" href="pyapi-mpconn.html">4.5.5 Connection Object (mp_conn)</A>
144
167
<b class="navlabel">Up:</b>
145
 
<a class="sectref" rel="parent" href="pyapi-mpconn.html">4.5.4 Connection Object (mp_conn)&nbsp;</A>
 
168
<a class="sectref" rel="parent" href="pyapi-mpconn.html">4.5.5 Connection Object (mp_conn)</A>
146
169
<b class="navlabel">Next:</b>
147
 
<a class="sectref" rel="next" href="pyapi-mpconn-mem.html">4.5.4.2 Connection Members</A>
148
 
<hr>
149
 
<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span>
 
170
<a class="sectref" rel="next" href="pyapi-mpconn-mem.html">4.5.5.2 Connection Members</A>
 
171
</div>
 
172
</div>
 
173
<hr />
 
174
<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span>
150
175
</DIV>
151
176
<!--End of Navigation Panel-->
152
177