@@ -149,13 +149,16 @@ get a single Linux computer and start three command-line shells ("terminals").
149
149
150
150
On terminal #2, start a server with: |br |
151
151
``box.cfg{listen=3302} `` |br |
152
+ ``box.schema.space.create('tspace') `` |br |
153
+ ``box.space.tspace:create_index('I') `` |br |
154
+ ``box.space.tspace:insert{280} `` |br |
152
155
``box.schema.user.grant('guest','read,write,execute,create,drop','universe') `` |br |
153
156
154
157
On terminal #3, start another server, which will act as a client, with: |br |
155
158
``box.cfg{} `` |br |
156
159
``net_box = require('net.box') `` |br |
157
160
``conn = net_box.connect('localhost:3302') `` |br |
158
- ``conn.space._space :select(280) `` |br |
161
+ ``conn.space.tspace :select(280) `` |br |
159
162
160
163
Now look at what tcpdump shows for the job connecting to 3302. -- the "request".
161
164
After the words "length 32" is a packet that ends with with these 32 bytes:
@@ -171,9 +174,9 @@ After the words "length 32" is a packet that ends with with these 32 bytes:
171
174
01 IPROTO_SELECT
172
175
86 MP_MAP, size 6 (we'll call this "Select-Map")
173
176
10 IPROTO_SPACE_ID (Select-Map Item#1)
174
- cd 01 18 MP_UINT = decimal 280 = id of _space
177
+ cd 02 00 MP_UINT = decimal 512 = id of tspace (could be larger)
175
178
11 IPROTO_INDEX_ID (Select-Map Item#2)
176
- 00 MP_INT = 0 = id of index within _space
179
+ 00 MP_INT = 0 = id of index within tspace
177
180
14 IPROTO_ITERATOR (Select-Map Item#3)
178
181
00 MP_INT = 0 = Tarantool iterator_type.h constant ITER_EQ
179
182
13 IPROTO_OFFSET (Select-Map Item#4)
0 commit comments