File: wamp.fbs

package info (click to toggle)
python-autobahn 22.7.1%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,404 kB
  • sloc: python: 38,356; javascript: 2,705; makefile: 905; ansic: 371; sh: 63
file content (85 lines) | stat: -rw-r--r-- 1,870 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85

//////////////////////////////////////////////////////////////////////////////
//
//   FlatBuffers schema for WAMP v2 messages
//   Copyright (c) Crossbar.io Technologies GmbH and contributors
//   Licensed under the MIT License (MIT)
//
//////////////////////////////////////////////////////////////////////////////

include "types.fbs";
include "roles.fbs";
include "auth.fbs";
include "session.fbs";
include "pubsub.fbs";
include "rpc.fbs";


// Web Application Message Protocol (WAMP) namespace.
//
// WAMP at the application level exposes 4 roles:
// 
// - Caller and Callee
// - Publisher and Subscriber
// 
// To decouple each pair of roles (or actors), WAMP uses an intermediary
// that may implement two additional roles:
// 
// - Dealer, to forward calls from Callers to Callees
// - Broker, to dispatch events from Publishers to Subscribers
// 
// WAMP is then defined in terms of message flow between those 6 roles.
// There 26 WAMP messages at the wire level, and these are defined
// (structurally) using FlatBuffers in this namespace.
namespace wamp.proto;


// A WAMP message is of exactly one of the following 26 concrete message types.
union AnyMessage
{
    // Session
    Hello,
    Welcome,
    Abort,
    Challenge,
    Authenticate,
    Goodbye,

    // Common
    Error,

    // PubSub
    Publish,
    Published,
    SubscriberReceived,     // NEW
    Subscribe,
    Subscribed,
    Unsubscribe,
    Unsubscribed,
    Event,
    EventReceived,          // NEW

    // RPC
    Call,
    Cancel,
    Result,
    Register,
    Registered,
    Unregister,
    Unregistered,
    Invocation,
    Interrupt,
    Yield
}


// A WAMP message container.
table Message
{
    // The WAMP message, one of the 26 different message types.
    msg: AnyMessage (required);
}


// The FlatBuffers root type is our WAMP message container type.
root_type Message;