Ejemplo n.º 1
0
        internal unsafe QuicConnection(IQuicInteropApi api, QuicSession session)
        {
            m_nativeApi = api;
            QuicHandle *handle = null;

            api.ConnectionOpen(session.m_handle, null, null, &handle);
            m_handle = handle;
        }
Ejemplo n.º 2
0
        internal unsafe QuicListener(IQuicInteropApi nativeApi, QuicSession session)
        {
            m_nativeApi = nativeApi;
            m_session   = session;

            connectionQueue = Channel.CreateBounded <QuicConnection>(new BoundedChannelOptions(128)
            {
                SingleWriter = true,
                SingleReader = true,
            });

            m_gcHandle = GCHandle.Alloc(this);

            QuicHandle *handle = null;

            m_nativeApi.ListenerOpen(session.m_handle, m_nativeListenerCallback, (void *)GCHandle.ToIntPtr(m_gcHandle), &handle);

            m_handle = handle;
        }