writeFrame static method

Future<void> writeFrame(
  1. P2PStream stream,
  2. OBPFrame frame, {
  3. Duration timeout = defaultTimeout,
  4. String context = 'unknown',
})

Write a single frame to stream

Handles frame encoding and ensures complete write.

Implementation

static Future<void> writeFrame(
  core_p2p_stream.P2PStream stream,
  OBPFrame frame, {
  Duration timeout = defaultTimeout,
  String context = 'unknown',
}) async {
  await _writeFrame(stream, frame, timeout: timeout, context: context);
}