<commit_before>The client allow you to send and receive messages through the Messaging Hub.

## Sending Messages

To send a message, you can use the following method:

```csharp
var message = new Message
{
    To = Node.Parse("user"),
    Content = "Message Text"
};

await client.SendMessageAsync(message);

```

Or you can use these extension methods to construct and send your message:

```csharp
await client.SendMessageAsync("Message Text", to: "user");

await client.SendMessageAsync("Message Text", Node.Parse("user"));
```

## Receiving Messages

To receive a message, you can simply build the client and call ReceiveMessageAsync:

```csharp
const string login = "user";
const string accessKey = "myAccessKey";

var client = new MessagingHubClientBuilder()
                 .UsingAccessKey(login, accessKey)<commit_msg>Update 3-messages.md<commit_after>The client allow you to send and receive messages through the Messaging Hub.

## Sending Messages

To send a message, you can use the following method:

```csharp
var message = new Message
{
    To = Node.Parse("user"),
    Content = new PlainText()
    {
        Text = "Message Text"
    }
};

await client.SendMessageAsync(message);

```

Or you can use these extension methods to construct and send your message:

```csharp
await client.SendMessageAsync("Message Text", to: "user");

await client.SendMessageAsync("Message Text", Node.Parse("user"));
```

## Receiving Messages

To receive a message, you can simply build the client and call ReceiveMessageAsync:

```csharp
const string login = "user";
const string accessKey = "myAccessKey";

var client = new MessagingHubClientBuilder()
                 .UsingAccessKey(login, accessKey)
{'fraction_non_alphanumeric': 0.10152582159624413, 'fraction_numerical': 0.0005868544600938967, 'mean_word_length': 4.3955696202531644, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '314289', 'n_tokens_mistral': 486, 'n_tokens_neox': 470, 'n_words': 183}