Show / Hide Table of Contents

Class GatewayHost

Acts as a bridge between traditional web browsers and IPFS. Through the gateway, users can browse files and websites stored in IPFS as if they were stored in a traditional web server.

Inheritance
Object
GatewayHost
Implements
IDisposable
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Ipfs.HttpGateway
Assembly: Ipfs.HttpGateway.dll
Syntax
public class GatewayHost : IDisposable

Constructors

| Improve this Doc View Source

GatewayHost(ICoreApi)

Creates a web host that bridges IPFS and HTTP on "http://127.0.0.1:8080"

Declaration
public GatewayHost(ICoreApi ipfs)
Parameters
Type Name Description
ICoreApi ipfs

The IPFS core features.

Remarks

This starts the web host on a separate thread. Use the Dispose method to stop the web host.

| Improve this Doc View Source

GatewayHost(ICoreApi, String)

Creates a web host that bridges IPFS and HTTP on the specified URL.

Declaration
public GatewayHost(ICoreApi ipfs, string url)
Parameters
Type Name Description
ICoreApi ipfs

The IPFS core features.

String url

The url to listen on, typically something like "http://127.0.0.1:8080". A random port can assigned via "http:/127.0.0.1:0".

Remarks

Use the Dispose method to stop the web host.

Properties

| Improve this Doc View Source

ServerUrl

Gets an URL to the server.

Declaration
public string ServerUrl { get; }
Property Value
Type Description
String

Methods

| Improve this Doc View Source

Dispose()

Declaration
public void Dispose()
| Improve this Doc View Source

Dispose(Boolean)

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
Boolean disposing
| Improve this Doc View Source

IpfsUrl(String)

Gets the url to the IPFS path.

Declaration
public string IpfsUrl(string path)
Parameters
Type Name Description
String path

The path to an IPFS file or directory. For example, "Qmhash" or "Qmhash/this/and/that".

Returns
Type Description
String

The fully qualified URL to the IPFS path. For example, "http://127.0.0.1:8080/ipfs/Qmhash";.

Implements

System.IDisposable
  • Improve this Doc
  • View Source
Back to top Generated by DocFX