You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The package debugstream provides two utility types, the Stream and the
Client.
The Stream type listens in a TCP endpoint and can be used to broadcast
events to all connected clients. The event type has a uint64 code and a
byte slice data fields. The Stream implementation is used only when btcd
is compiled with the debug tag, otherwise a nop implementation is used.
The Client connects with the Stream via TCP and starts receiving the
events, which are passed into a handler callback, allowing assertions
inside tests.
All events broadcasted in the stream are stored in memory and sent to
all clients after connection, this way if the client connects after the
broadcast of events, it still receives all of them.
0 commit comments