Where is the 'End' Of Stream in JAVA socket(when DataInputStream.read() returns -1)? The connection colsed, or just one frame is finished? – Telegram API
I'm confused by DataInputStream.read() method which is explained "If no byte is available because the end of the stream has been reached, the value -1 is returned. " in javadoc/api. With my following code snippet and telegram captured by wireshark,…