close method
void
close([
- dynamic discard = false
Closes the socket and underlying transport.
Implementation
void close([discard = false]) {
if ('open' != readyState) return;
readyState = 'closing';
if (writeBuffer.isNotEmpty) {
once('drain', (_) => closeTransport(discard));
return;
}
closeTransport(discard);
}