Function clientNoise
Connect to a remote, vibe-noisestream based API server.
auto auto clientNoise(API)
(
NoiseSettings settings,
string host,
ushort port,
string bind_interface = null,
ushort bind_port = cast(ushort)0u
);
auto auto clientNoise(API)
(
NoiseSettings settings,
NetworkAddress addr,
NetworkAddress bind_address = anyAddress()
);
Examples
abstract static class API
{
string someMethod(string name);
}
auto settings = NoiseSettings(NoiseKind .client);
settings .privateKeyPath = Path("client.key");
settings .remoteKeyPath = Path("server.pub");
auto client = clientNoise!API(settings, "127.0.0.1", 8030);
client .someMethod("john");
client .closeTCP();