# tmux.Server.LoadBufferFrom

- **Module:** tmux.Server
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmux/server_buffers.go#L227
- **Page:** https://libtmux.org/en/go/latest/reference/tmux-server-loadbufferfrom/

```
tmux.Server.LoadBufferFrom(ctx: context.Context, source: io.Reader, options: LoadBufferFromOptions) -> error
```

LoadBufferFrom streams source into a named or newly allocated tmux paste buffer, reading it to completion without holding its contents in memory. It carries any bytes, including NUL, and is bounded by neither argv nor tmux's command-message limit, which is what [Server.SetBuffer] is bounded by.

A copy failure after tmux exits zero means the buffer holds only the prefix
that reached tmux, and cancellation does not prove tmux stored nothing. A
source that blocks regardless of cancellation does not hold the call, and is
still being read when it returns. A [Connection]-bound Server returns
[ErrConnectionRequiresProcess]: tmux offers no stdin to a control client, so
use [Server.LoadBuffer] and a path over a connection.
