How to get confirmation in TCP connection in Java

I wrote a socket program in Java. Both server and client can send / receive data to each other. But I found that if the client sends data to the server using TCP, then internally TCP sends an acknowledgment to the client after the server receives the data. I want to detect or process this confirmation. How can I read or write data to TCP so that I can process TCP acknowledgment. Thank.

+3
source share
4 answers

This is simply not possible, even if you programmed in C directly against the native OS API. One of the points of the socket API is that it abstracts this for you.

TCP Java . , Java, , , .

. .

+3

, TCP, . , , , , , TCP . @Eric, .

, -, . , , . , , , , ? ?

, NIO code, . , .

+2

.

API ACK .

. , , . , , , , .

+1

Java, API Java , TCP.

, IP-, TCP. DLPI - API ,

http://www.opengroup.org/onlinepubs/9638599/chap1.htm

, Java- . JNI.

+1

Source: https://habr.com/ru/post/1749019/


All Articles