Function clientTCP

Connect to a remote, TCP based API server.

auto auto clientTCP(API) (
  string host,
  ushort port,
  string bind_interface = null,
  ushort bind_port = cast(ushort)0u
);

auto auto clientTCP(API) (
  NetworkAddress addr,
  NetworkAddress bind_address = anyAddress()
);

Examples

abstract static class API
{
    string someMethod(string name);
}
auto client = clientTCP!API("127.0.0.1", 8030);
client.someMethod("john");
client.closeTCP();