How to use the read function from bindings

Find comprehensive JavaScript bindings.read code examples handpicked from public code repositorys.

115
116
117
118
119
120
121
122
123
}

async read(buf: Buffer) {
  this.sureAddress();

  const answer = await fromCallback(cb => wire.read(buf, cb));
  await tick();
  return answer;
}
fork icon90
star icon0
watch icon2

+ 9 other calls in file

27
28
29
30
31
32
33
34
35
36
 * @param {Number} fd
 * @param {Number} n
 */

export function read (fd, n) {
  return bindings.read(fd, n || 1024);
}

/**
 * Write `n' bytes to `fd'
fork icon3
star icon25
watch icon10

+ 9 other calls in file

21
22
23
24
25
26
27
28
29
30
                this.push(data);
        });
}
_read(size: number) {
        if (this.inst) {
                bindings.read(this.inst);
        } else {
                this.push(null);
        }
}
fork icon1
star icon0
watch icon0

41
42
43
44
45
46
47
48
49
50

  if (!this.isOpen) {
    return asyncError(cb, new Error('Port is not open'));
  }

  binding.read(this.fd, buffer, offset, length, cb);
};

WindowsBinding.prototype.open = function(path, options, cb) {
  if (!path) {
fork icon0
star icon0
watch icon1

+ 11 other calls in file

Other functions in bindings

Sorted by popularity

function icon

bindings.createKey is the most popular function in bindings (8616 examples)