Posts

Showing posts from February 25, 2019

Why maximum length of IP, TCP, UDP packet is not suit?

Image
3 0 From many tutorials, I get follow knowledge(maybe I'm misunderstood) : maximum of an Ethernet packet is about 1500 bytes. maximum of an IP packet is about 65535 bytes. maximum of a UDP packet is 65515 bytes But when I made a test and watch Wireshark, I get a different answer. I try to send some big data with TCP protocol. Socket con = new Socket("localhost", 8088); OutputStream os = con.getOutputStream(); StringBuilder s = new StringBuilder(); for( int i = 0; i < 10000; i++) { s.append("Hello world"); } // about 110k bytes byte data = s.toString().getBytes(); os.write(data); os.close(); con.close(); This is my Java code (it's not necessary to understand this.), I try to send 110k bytes data with a TCP connec