<p>As the comment says: 1-byte values.</p>
<p>It's an abstraction for sending byte values from one process to another process, for inter-process communication.</p>
<p>What those bytes are or what they represent is up to the code using this class.</p>
<p>The point is that users of the class don't need to know how that communication happens, and, in fact, may differ from one platform/operating system to another.</p>

CC BY-SA 4.0
2022-11-14T18:44:27.610Z
2022-11-14T18:44:27.610Z
Pieter Wuille
<p>There is a class <a href="https://github.com/bitcoin/bitcoin/blob/v23.0/src/util/tokenpipe.h#L75" rel="nofollow noreferrer">here</a> in the Bitcoin core called <code>TokenPipe</code>. I've tried to figure out what is does but couldn't find anything useful. The comment says:</p>
<blockquote>
<p>An interprocess or interthread pipe for sending tokens (one-byte
values) over.</p>
</blockquote>
<p>But don't understand it. What are tokens?</p>

<bitcoin-core><bitcoin-core-development>
What is TokenPipe class in the Bitcoin Core?
Amir reza Riahi
# What is TokenPipe class in the Bitcoin Core?

(Asked by: username_0 on 2022-11-14)

There is a class [here](https://github.com/bitcoin/bitcoin/blob/v23.0/src/util/tokenpipe.h#L75) in the Bitcoin core called `TokenPipe`. I've tried to figure out what is does but couldn't find anything useful. The comment says:

> An interprocess or interthread pipe for sending tokens (one-byte
> values) over.

But don't understand it. What are tokens?

**Tags:** bitcoin-core, bitcoin-core-development


---

## 1 answers

### Answer by username_1 on 2022-11-14. Score: 1 | Accepted answer

As the comment says: 1-byte values.

It's an abstraction for sending byte values from one process to another process, for inter-process communication.

What those bytes are or what they represent is up to the code using this class.

The point is that users of the class don't need to know how that communication happens, and, in fact, may differ from one platform/operating system to another.


---

