bind static method
Bind client to host and port
Implementation
static Future<TFtpClient> bind(String host, int port, {int blockSize = 512}) {
Completer<TFtpClient> completer = Completer();
RawDatagramSocket.bind(host, port).then((socket) {
var client = TFtpClient(host, port, blockSize: blockSize);
client._socket = socket;
client._stream = socket.asBroadcastStream();
completer.complete(client);
});
return completer.future;
}