Skip to content

Commit d748cd3

Browse files
committed
Small error fix in box_protocol.rst
1 parent d7cacae commit d748cd3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

doc/dev_guide/internals/box_protocol.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,16 @@ get a single Linux computer and start three command-line shells ("terminals").
149149

150150
On terminal #2, start a server with: |br|
151151
``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|
152155
``box.schema.user.grant('guest','read,write,execute,create,drop','universe')`` |br|
153156

154157
On terminal #3, start another server, which will act as a client, with: |br|
155158
``box.cfg{}`` |br|
156159
``net_box = require('net.box')`` |br|
157160
``conn = net_box.connect('localhost:3302')`` |br|
158-
``conn.space._space:select(280)`` |br|
161+
``conn.space.tspace:select(280)`` |br|
159162

160163
Now look at what tcpdump shows for the job connecting to 3302. -- the "request".
161164
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:
171174
01 IPROTO_SELECT
172175
86 MP_MAP, size 6 (we'll call this "Select-Map")
173176
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)
175178
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
177180
14 IPROTO_ITERATOR (Select-Map Item#3)
178181
00 MP_INT = 0 = Tarantool iterator_type.h constant ITER_EQ
179182
13 IPROTO_OFFSET (Select-Map Item#4)

0 commit comments

Comments
 (0)