FastBinaryEncoding
FastBinaryEncoding copied to clipboard
Missing documentation for Message
In the proto.fbe example, the last three objects are of type "message", but that type is not found in the README or in the spec.
Yes, spec should be updated with messages, requests and responses. Briefly message is a root struct for RPC (generated sender, receiver and client). Message could be request, response, reject and notification. For each request it is possible to declare one corresponding response and one or more rejects:
// Domain declaration
domain com.chronoxor
// Package declaration
package simple
// Protocol version
version 1.0
// Simple request message
[request]
[response(SimpleResponse)]
[reject(SimpleReject)]
message SimpleRequest
{
// Request Id
uuid [id] = uuid1;
// Request message
string Message;
}
// Simple response
message SimpleResponse
{
// Response Id
uuid [id] = uuid1;
// Calculated message length
uint32 Length;
// Calculated message hash
uint32 Hash;
}
// Simple reject
message SimpleReject
{
// Reject Id
uuid [id] = uuid1;
// Error message
string Error;
}
// Simple notification
message SimpleNotify
{
// Server notification
string Notification;
}
// Disconnect request message
[request]
message DisconnectRequest
{
// Request Id
uuid [id] = uuid1;
}
C++ generated protocol with server & client examples
C# generated protocol with server & client examples