|
9 | 9 | * A single connection to MongoDB server, of which more than one may exist |
10 | 10 | * in the Protocol class based on read preference. |
11 | 11 | * |
| 12 | + * @see https://www.mongodb.com/docs/manual/reference/mongodb-wire-protocol/ |
12 | 13 | * @see https://docs.mongodb.com/manual/core/read-preference-mechanics/ |
13 | 14 | * @test com.mongodb.unittest.ConnectionTest |
14 | 15 | */ |
15 | 16 | class Connection { |
16 | 17 | const OP_REPLY = 1; |
17 | | - const OP_UPDATE = 2001; |
18 | | - const OP_INSERT = 2002; |
19 | 18 | const OP_QUERY = 2004; |
20 | | - const OP_GET_MORE = 2005; |
21 | | - const OP_DELETE = 2006; |
22 | | - const OP_KILL_CURSORS = 2007; |
23 | 19 | const OP_MSG = 2013; |
| 20 | + const OP_COMPRESSED = 2012; |
24 | 21 |
|
25 | 22 | const RSGhost = 'RSGhost'; |
26 | 23 | const RSPrimary = 'RSPrimary'; |
@@ -100,7 +97,7 @@ public function establish($options= [], $auth= null) { |
100 | 97 | 'application' => ['name' => $options['params']['appName'] ?? $_SERVER['argv'][0] ?? 'php'], |
101 | 98 | 'driver' => ['name' => 'XP MongoDB Connectivity', 'version' => '3.0.0'], |
102 | 99 | 'os' => ['name' => php_uname('s'), 'type' => PHP_OS, 'architecture' => php_uname('m'), 'version' => php_uname('r')] |
103 | | - ] |
| 100 | + ], |
104 | 101 | ]; |
105 | 102 |
|
106 | 103 | // If the optional field saslSupportedMechs is specified, the command also returns |
@@ -162,7 +159,7 @@ public function hello($command= []) { |
162 | 159 | ); |
163 | 160 | $document= &$reply['documents'][0]; |
164 | 161 |
|
165 | | - // See https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#type |
| 162 | + // See https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md#type |
166 | 163 | if ($document['ok'] ?? false) { |
167 | 164 | if (isset($document['isreplicaset'])) { |
168 | 165 | $kind= self::RSGhost; |
|
0 commit comments