JAVA   53

Socket

Guest on 12th May 2022 10:03:15 AM

  1. class Socket {
  2.   …
  3.   native int available() throws IOException
  4. `{
  5.   int num;
  6.   int fd = `this.native_fd ;
  7.   if (ioctl(fd, FIONREAD, &num) != 0)
  8. `throw new IOException(
  9.   `_newJavaString(strerror(errno)));
  10.   return num;
  11. }

Raw Paste


Login or Register to edit or fork this paste. It's free.