fixed bug of udp not working when using listen
[lcore.git] / lcore.pas
index da0fd66b89365b4272b74707dd40de189c7f2f58..99e633974383a075aa99c86854c3d6cb6b365bba 100755 (executable)
--- a/lcore.pas
+++ b/lcore.pas
@@ -35,7 +35,13 @@ interface
 \r
 \r
   const\r
-    packetbasesize = 1460;\r
+    {how this number is made up:\r
+    - ethernet: MTU 1500\r
+    - be safe for either "ethernet v1" or "PPPoE", both take 8 bytes\r
+    - IPv6 header: 40 bytes (IPv4 is 20)\r
+    - TCP/UDP header: 20 bytes\r
+    }\r
+    packetbasesize = 1432;\r
     receivebufsize=packetbasesize*8;\r
 \r
   var\r