write method

void write(
  1. Object msg
)

will pass the given object directly to the Socket.write method (using Object.toString if needed) Note: you should probably use send instead.

Implementation

void write(Object msg) => _socket?.write(msg);