Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing documentation for Message #85

Open
bmezhibovskiy opened this issue Feb 17, 2023 · 2 comments
Open

Missing documentation for Message #85

bmezhibovskiy opened this issue Feb 17, 2023 · 2 comments

Comments

@bmezhibovskiy
Copy link

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.

@chronoxor
Copy link
Owner

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;
}

@chronoxor
Copy link
Owner

C++ generated protocol with server & client examples

C# generated protocol with server & client examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants