createFactory<T extends ProtocolChannel> static method
Implementation
static ProtocolFactory createFactory<T extends ProtocolChannel>({required T channel}) {
var used = false;
return () {
if (used) {
throw ProtocolReconnectUnsupportedException('protocolFactory was not configured for reconnecting this protocol');
}
used = true;
return Protocol<T>(channel: channel);
};
}