ceremonyclient/bedlam/ot/io.go
Cassandra Heart dbd95bd9e9
v2.1.0 (#439)
* v2.1.0 [omit consensus and adjacent] - this commit will be amended with the full release after the file copy is complete

* 2.1.0 main node rollup
2025-09-30 02:48:15 -05:00

33 lines
648 B
Go

//
// io.go
//
// Copyright (c) 2023-2024 Markku Rossi
//
// All rights reserved.
package ot
// IO defines an I/O interface to communicate between peers.
type IO interface {
// SendByte sends a byte value.
SendByte(val byte) error
// SendUint32 sends an uint32 value.
SendUint32(val int) error
// SendData sends binary data.
SendData(val []byte) error
// Flush flushed any pending data in the connection.
Flush() error
// ReceiveByte receives a byte value.
ReceiveByte() (byte, error)
// ReceiveUint32 receives an uint32 value.
ReceiveUint32() (int, error)
// ReceiveData receives binary data.
ReceiveData() ([]byte, error)
}