On linux, I assume that Java sockets end up calling the glibc sockets.
How does the interaction between these two layers happen? Is it akin to a JNI call or is there some special faster way of accessing glibc functions from Java?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Sockets are implemented by the kernel, and the system call function wrappers are provided by whatever C library the JVM implementors happen to be using. Java calls the C library via JNI, the C library calls the kernel via a system-call software interrupt. There is no conceptual difference in this process between JDKs, although implementation details may vary.
There is really no such thing. Socket functions are system calls. All that glibc does is provide the C wrapper.