internal LocalChannel(LocalServerChannel parent, LocalChannel peer) : base(parent) { //this.Configuration.Allocator(new PreferHeapByteBufAllocator(config.getAllocator())); this.peer = peer; if (parent != null) { this.localAddress = parent.LocalAddress; } if (peer != null) { this.remoteAddress = peer.LocalAddress; } this.Configuration = new DefaultChannelConfiguration(this); this.shutdownHook = () => this.Unsafe.CloseAsync(); }
internal LocalChannel(LocalServerChannel parent, LocalChannel peer) : base(parent) { _inboundBuffer = PlatformDependent.NewMpscQueue <object>(); v_peer = peer; if (parent is object) { v_localAddress = parent.LocalAddress; } if (peer is object) { v_remoteAddress = peer.LocalAddress; } var config = new DefaultChannelConfiguration(this); config.Allocator = new PreferHeapByteBufAllocator(config.Allocator); Configuration = config; shutdownHook = () => Unsafe.Close(Unsafe.VoidPromise()); }