JVM调用时可以找到Linux插座API

Where Linux socket API can be found when invoked by JVM?

本文关键字:Linux 插座 API 调用 JVM      更新时间:2023-10-16

我试图找到用于从JVM读取网络流的Linux套接字API,但是我在以下代码上封锁了,因为我不知道如何继续检查:: recv,我不知道哪个类声明实现它,因为它在其前面没有类名。

int os::recv(int fd, char *buf, int nBytes, int flags) {
  INTERRUPTIBLE_RETURN_INT(::recv(fd, buf, nBytes, flags), os::Solaris::clear_interrupted);
}
at file openjdk-7-fcs-src-b147-27_jun_2011openjdkhotspotsrcossolarisvmos_solaris.cpp

我的问题是如何获取:: recv的声明实现以及我们可以在哪里找到linux套接字API来读取JVM调用的网络流。

::recv()是操作系统提供的系统调用。您无法沿着这条路走。