disconnect method
Implementation
@override
Future<ByteChannel?> disconnect() async {
C? sock = _sock;
bool ok = sock == null || await doDisconnect(sock);
if (!ok) {
assert(false, 'failed to disconnect socket: $sock');
return null;
}
// remoteAddress = null;
return sock is ByteChannel ? sock as ByteChannel : null;
}