messaging
framewise_meet_client.messaging
MessageSender
Manages sending messages to the server.
Source code in framewise_meet_client/messaging.py
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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
|
__init__(connection)
Initialize the message sender.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connection
|
WebSocketConnection instance |
required |
Source code in framewise_meet_client/messaging.py
19 20 21 22 23 24 25 |
|
_send_message(message)
async
Send a message over the WebSocket connection.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message
|
Dict[str, Any]
|
Message data to send |
required |
Raises:
Type | Description |
---|---|
ConnectionError
|
If the connection is not established |
Source code in framewise_meet_client/messaging.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|
send_generated_text(text, is_generation_end=False, loop=None)
Send generated text to the server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text
|
str
|
The generated text |
required |
is_generation_end
|
bool
|
Whether this is the end of generation |
False
|
loop
|
AbstractEventLoop
|
Event loop to use for coroutine execution (uses current loop if None) |
None
|
Source code in framewise_meet_client/messaging.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|
send_custom_ui_element(ui_type, data, loop=None)
Send a custom UI element to the server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ui_type
|
str
|
Type of UI element (e.g., 'mcq_question') |
required |
data
|
Dict[str, Any]
|
Element-specific data |
required |
loop
|
AbstractEventLoop
|
Event loop to use for coroutine execution (uses current loop if None) |
None
|
Source code in framewise_meet_client/messaging.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
send_mcq_question(question_id, question, options, loop=None)
Send an MCQ question as a custom UI element.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
question_id
|
str
|
Unique identifier for the question |
required |
question
|
str
|
The question text |
required |
options
|
List[str]
|
List of answer options |
required |
loop
|
AbstractEventLoop
|
Event loop to use for coroutine execution (uses current loop if None) |
None
|
Source code in framewise_meet_client/messaging.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
|
send_notification(message, level='info', duration=8000, loop=None)
Send a notification to all users in the meeting.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message
|
str
|
The notification message to display |
required |
level
|
str
|
The notification level (info, warning, error, success) |
'info'
|
duration
|
int
|
How long the notification should display (in milliseconds) |
8000
|
loop
|
Optional[AbstractEventLoop]
|
Event loop to run the coroutine in |
None
|
Source code in framewise_meet_client/messaging.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
|