This repository was archived by the owner on Feb 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 327
/
Copy pathfunction.log-reply.html
179 lines (135 loc) · 5.58 KB
/
function.log-reply.html
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Callback When Reading the MongoDB reply</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />
</head>
<body class="docs"><div class="navbar navbar-fixed-top">
<div class="navbar-inner clearfix">
<ul class="nav" style="width: 100%">
<li style="float: left;"><a href="function.log-killcursor.html">« log_killcursor</a></li>
<li style="float: right;"><a href="function.log-write-batch.html">log_write_batch »</a></li>
</ul>
</div>
</div>
<div id="breadcrumbs" class="clearfix">
<ul class="breadcrumbs-container">
<li><a href="index.html">PHP Manual</a></li>
<li><a href="mongo.context.html">Stream Context Options</a></li>
<li>Callback When Reading the MongoDB reply</li>
</ul>
</div>
<div id="layout">
<div id="layout-content"><div id="function.log-reply" class="refentry">
<div class="refnamediv">
<h1 class="refname">log_reply</h1>
<p class="verinfo">(PECL mongo >= 1.5.0)</p><p class="refpurpose"><span class="refname">log_reply</span> — <span class="dc-title">Callback When Reading the MongoDB reply</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.log-reply-description">
<h3 class="title">Description</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>log_reply</strong></span>(<span class="methodparam"><span class="type">array</span> <code class="parameter">$server</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$messageHeaders</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$operationHeaders</code></span>)</div>
<p class="para rdfs-comment">
A <span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> function, used by the
<a href="" class="link">log_reply context option</a>,
when reading a reply from MongoDB.
</p>
<blockquote class="note"><p><strong class="note">Note</strong>:
<p class="para">
This is <em class="emphasis">not</em> a real function, only a prototype of how the function should
be.
</p>
</p></blockquote>
</div>
<div class="refsect1 parameters" id="refsect1-function.log-reply-parameters">
<h3 class="title">Parameters</h3>
<dl>
<dt>
<code class="parameter">server</code> </dt>
<dd>
<p class="para"> An array containing the basic information about the server that was picked. <table class="doctable informaltable"> <thead> <tr> <th>key</th> <th>value</th> </tr>
</thead>
<tbody class="tbody"> <tr> <td>hash</td> <td>server hash, example: <code class="literal">localhost:27017;-;X;56052</code></td> </tr>
<tr> <td>type</td> <td>Node type (primary/secondary/mongos/arbiter): <code class="literal">2</code></td> </tr>
<tr> <td>max_bson_size</td> <td>The maximum BSON Size over the wire this node accepts: <code class="literal">16777216</code></td> </tr>
<tr> <td>max_message_size</td> <td>The maximum Message Size over the wire this node accepts: <code class="literal">48000000</code></td> </tr>
<tr> <td>request_id</td> <td>The request identifier for this message: <code class="literal">42</code></td> </tr>
</tbody> </table>
</p> </dd>
<dt>
<code class="parameter">messageHeaders</code>
</dt>
<dd>
<p class="para">
<table class="doctable informaltable">
<thead>
<tr>
<th>key</th>
<th>value</th>
</tr>
</thead>
<tbody class="tbody">
<tr>
<td>length</td>
<td>integer, bytes, message reply length</td>
</tr>
<tr>
<td>request_id</td>
<td>integer, the server request identifier</td>
</tr>
<tr>
<td>response_id</td>
<td>integer, the driver request identifier this message is a response of</td>
</tr>
<tr>
<td>opcode</td>
<td>integer, the opcode id</td>
</tr>
</tbody>
</table>
</p>
</dd>
<dt>
<code class="parameter">operationHeaders</code>
</dt>
<dd>
<p class="para">
<table class="doctable informaltable">
<thead>
<tr>
<th>key</th>
<th>value</th>
</tr>
</thead>
<tbody class="tbody">
<tr>
<td>flags</td>
<td>integer, bitmask of protocol flags</td>
</tr>
<tr>
<td>cursor_id</td>
<td>integer, ID of the cursor created on the server (0 if none created, or its been exhausted)</td>
</tr>
<tr>
<td>start</td>
<td>The starting offset of this cursor</td>
</tr>
<tr>
<td>returned</td>
<td>integer, how many documents are returned in this trip</td>
</tr>
</tbody>
</table>
</p>
</dd>
</dl>
</div>
<div class="refsect1 seealso" id="refsect1-function.log-reply-seealso">
<h3 class="title">See Also</h3>
<ul class="simplelist">
<li class="member">The <a href="https://docs.mongodb.com/meta-driver/latest/legacy/mongodb-wire-protocol/" class="link external">» OP_REPLY definition in the Wire Protocol</a></li>
</ul>
</div>
</div></div></div></body></html>