Documentation ¶
Overview ¶
Package rawpeer provides low level access to a bitcoin p2p node. It provides connect/handshake/disconnect and read/write commands.
Most implementations should not use this package directly.
Index ¶
- Variables
- type RawPeer
- func (r *RawPeer) Close() error
- func (r *RawPeer) Connect(ctx context.Context) error
- func (r *RawPeer) HasService(f wire.ServiceFlag) bool
- func (r *RawPeer) Id() int
- func (r *RawPeer) IsConnected() bool
- func (r *RawPeer) Read(timeout time.Duration) (wire.Message, []byte, error)
- func (r *RawPeer) RemoteVersion() (*wire.MsgVersion, error)
- func (r *RawPeer) String() string
- func (r *RawPeer) Write(timeout time.Duration, msg wire.Message) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrHandshakeNotComplete = errors.New("handshake not complete")
)
Functions ¶
This section is empty.
Types ¶
type RawPeer ¶
type RawPeer struct {
// contains filtered or unexported fields
}
func NewFromConn ¶
func (*RawPeer) HasService ¶
func (r *RawPeer) HasService(f wire.ServiceFlag) bool
func (*RawPeer) IsConnected ¶
func (*RawPeer) RemoteVersion ¶
func (r *RawPeer) RemoteVersion() (*wire.MsgVersion, error)
Click to show internal directories.
Click to hide internal directories.