G
G
gd1xza2021-01-20 11:11:23
Java
gd1xza, 2021-01-20 11:11:23

Java socket api berkley-style?

python
socket.socket(AF_INET,SOCK_STREAM)

java?

where to get native or third party implementation of berkeley sockets for java jdk15

because all types are needed and setopt
(af_inet,pf_packet,sock_raw,ip_protoudp,so_reuseaddr,so_reuseport)

pseudocode example:

Socket socket = new Socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP);
socket.setopt(SO_REUSEADDR,1);
InputStream is = socket.getInputStream();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2021-01-20
@gd1xza

In the java.net standard library package. Naturally, it will not have pf_packet and sock_raw, as this is too low level for a virtual machine. If you need them, then you have chosen the wrong language.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question