32 lines
983 B
JavaScript
32 lines
983 B
JavaScript
// Metro module 1181 (f1182).
|
|
import _classCallCheck from "./_classCallCheck";
|
|
import _createClass from "./_createClass";
|
|
import { makePromiseBuffer } from "./Module817";
|
|
import { NATIVE } from "./Module1001";
|
|
let c984_3;
|
|
let NativeTransport;
|
|
let env984 = {};
|
|
export function makeNativeTransport(r3 = {}) {
|
|
return new c984_3(r3);
|
|
}
|
|
NativeTransport = function NativeTransport(r2 = {}) {
|
|
_classCallCheck(this, NativeTransport);
|
|
this._buffer = makePromiseBuffer(r2.bufferSize || 30);
|
|
};
|
|
c984_3 = _createClass(NativeTransport, [{
|
|
key: "send",
|
|
value: function send(c24288_0) {
|
|
return this._buffer.add(() => NATIVE.sendEnvelope(c24288_0)).then(() => ({}));
|
|
}
|
|
}, {
|
|
key: "flush",
|
|
value: function flush(a0) {
|
|
return this._buffer.drain(a0);
|
|
}
|
|
}]);
|
|
export const DEFAULT_BUFFER_SIZE = 30;
|
|
export { c984_3 as NativeTransport };
|
|
export function makeNativeTransportFactory(a0) {
|
|
return a0.enableNative ? NATIVE.isNativeAvailable() ? makeNativeTransport : null : null;
|
|
}
|