public static QuicheConnection Connect( string serverName, byte[] scid, QuicheConfig config) { var conn = NativeMethods.quiche_connect( serverName, scid, (ulong)scid.Length, config.Config); return(new QuicheConnection(conn)); }
public static QuicheConnection Accept( byte[] scid, byte[] odcid, QuicheConfig config) { var conn = NativeMethods.quiche_accept( scid, (ulong)scid.Length, odcid, (ulong)odcid.Length, config.Config); return(new QuicheConnection(conn)); }
protected virtual void Dispose(bool disposing) { if (!_disposed) { // dispose managed resource if (disposing) { if (Config != null) { Config.Dispose(); Config = null; } } _disposed = true; } }
public static QuicheConnection WithTls( byte[] scid, byte[] odcid, QuicheConfig config, byte[] ssl, bool isServer) { var ptr = Marshal.AllocCoTaskMem(ssl.Length); Marshal.Copy(ssl, 0, ptr, ssl.Length); var conn = NativeMethods.quiche_conn_new_with_tls( scid, (ulong)scid.Length, odcid, (ulong)odcid.Length, config.Config, ptr, isServer); Marshal.FreeCoTaskMem(ptr); return(new QuicheConnection(conn)); }
public QuicheClient(QuicheConfig config) { Config = config; }
public QuicheListener(QuicheConfig config) { Config = config; }