May 2017
Intermediate to advanced
388 pages
7h 30m
English
We have full control over the data flow between the client and the server. Also, the data is very efficient on the wire, which makes this technology very powerful. You can explore it more by creating more methods with different types. For example, we can specify enumeration types as shown:
message Response { int64 client_id = 1; bytes stream = 2; enum DayOfWeek { MONDAY = 0; TUESDAY = 1; WEDNESDAY = 2; THURSDAY = 3; FRIDAY = 4; SATURDAY = 5; SUNDAY = 6; } DayOfWeek days0fWeek = 3;}//on the server.js call.write({stream: buf, client_id: call.request.client_id, days0fWeek: 0});
Read now
Unlock full access