> For the complete documentation index, see [llms.txt](https://tariksavas.gitbook.io/tarnet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tariksavas.gitbook.io/tarnet/docs/how-to-use/socketbuilder/setmessageconfig.md).

# SetMessageConfig

```csharp
SocketBuilder SetMessageConfig(MessageConfig config)
```

* **Description:**\
  This method sets the message configuration for the builder. It allows you to define how messages will be processed, including whether compression should be applied and the buffer size used for message handling.
* **Parameters:**
  * `config` (`MessageConfig`): A configuration object that holds message processing settings, including the buffer size and whether compression should be enabled.
* **Returns:**\
  `SocketBuilder`: Returns the `SocketBuilder` instance, allowing method chaining.
