connect method

Future<StatsdConnection> connect (
  1. Uri uri
)

Connects to the uri.

Only UDP connections supported at this moment. Example URI: udp://127.0.0.1:8125

Implementation

static Future<StatsdConnection> connect(Uri uri) {
  if (uri.scheme != 'udp') {
    throw new ArgumentError.value(
        uri, 'uri', 'Only UDP connections supported at this moment.');
  }

  return StatsdUdpConnection.bind(uri.host, uri.port);
}