sendAndClose method

Future sendAndClose(
  1. Object msg, {
  2. dynamic appendTerminator = true,
})

will send a single message to the socket and then immediately close it. Use this when you don't care about the response.

Implementation

Future sendAndClose(Object msg, {appendTerminator = true}) {
  send(msg, appendTerminator: appendTerminator);
  return close();
}