connectSync method - RawSynchronousSocket class - dart:io library (original) (raw)

description

RawSynchronousSocket connectSync(

  1. dynamic host,
  2. int port )

Creates a new socket connection and returns a RawSynchronousSocket.

The host can either be a String or an InternetAddress. If host is a String, connectSync will perform aInternetAddress.lookup and try all returned InternetAddresses, until connected. Unless a connection was established, the error from the first failing connection is returned.

Implementation

external static RawSynchronousSocket connectSync(host, int port);