> For the complete documentation index, see [llms.txt](https://sending-network.gitbook.io/sending.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sending-network.gitbook.io/sending.network/sdk-documentation/unreal-sdk/message.md).

# Message

### Send message

```cpp
Room::sendMessage(Event msg)
```

Parameters:

| Name     | Type   | Description     | Required |
| -------- | ------ | --------------- | -------- |
| room\_id | string | room\_id string | true     |
| Text     | String | Text            | True     |

### Receive message

```cpp
auto roomId = m[1].str();
auto room = c.room(roomId);

auto msgs = +room.timelineEvents();

std::cout << "Messages in " << roomId << ":\n";
for (auto msg : msgs) {
std::cout << "Event "
<< msg.id() << " from "
<< msg.sender() << " at "
<< msg.originServerTs() << " typed "
<< msg.type() << "\n";
std::cout << msg.content().get().dump();
std::cout << std::endl;
}
```
