You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -295,7 +295,7 @@ const type = new sb.StructType({
295
295
one: someType,
296
296
two: someType
297
297
})
298
-
/*type translates into
298
+
//type translates into
299
299
[
300
300
0x51/*StructType*/,
301
301
2/*2 fields*/,
@@ -307,7 +307,6 @@ const type = new sb.StructType({
307
307
0xff, /*type is defined previously*/
308
308
0, 11/*type is defined 11 bytes before the 0 on this line*/
309
309
]
310
-
*/
311
310
````
312
311
In the following definitions, `type` means the binary type format.
313
312
@@ -432,13 +431,13 @@ In the following definitions, `type` means the binary type format.
432
431
- `value` - value serialized by specified type
433
432
-`RecursiveType`:
434
433
- `valueNotYetWrittenInBuffer` - byte containing either `0x00` or `0xFF`
435
-
- If `valueNotYetWrittenInBuffer`
434
+
- If `valueNotYetWrittenInBuffer`:
436
435
- `value` - value serialized by `recursiveType`
437
-
- Else
436
+
- Else:
438
437
- `offset` ([position of first byte of `offset` in buffer] - [position of `value` in buffer]) - `uint32_t`
439
438
-`OptionalType`:
440
439
- `valueIsNonNull` - byte containing either `0x00` or `0xFF`
441
-
- If `valueIsNonNull`
440
+
- If `valueIsNonNull`:
442
441
- `value` - value serialized by `typeIfNonNull`
443
442
-`PointerType`:
444
443
- `index` of value in buffer (note: if buffer contains both a type and a value, this index is relative to the start of the value data) - `uint32_t`
@@ -450,7 +449,7 @@ Versions will be of the form `x.y.z`.
450
449
`z` is the version of the type and value specification, which is independent of the API version. It should match the version set in `config.js`.
451
450
452
451
## Testing
453
-
To test the NodeJS code, run `npm test`.
452
+
To test the Node.js code, run `npm test`.
454
453
To test the HTTP transaction code, run `node client-test/server.js` and open `localhost:8080` in your browser. Open each link in a new page. `Upload` and `Download` should each alert `Success`, while `Upload & Download` should alert `Upload: Success` and `Download: Success`.
0 commit comments