lcore.org gitweb
/
lcore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add unitfork.pas to uses clause of test app so it's compilation gets checked
[lcore.git]
/
lcore.pas
diff --git
a/lcore.pas
b/lcore.pas
index da0fd66b89365b4272b74707dd40de189c7f2f58..7db6b3ef2e5e50b5a54043ee0989a3fe7b10eace 100755
(executable)
--- a/
lcore.pas
+++ b/
lcore.pas
@@
-35,7
+35,13
@@
interface
\r
\r
const
\r
\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
receivebufsize=packetbasesize*8;
\r
\r
var
\r
@@
-567,7
+573,16
@@
begin
internalclose(0);
\r
\r
end else begin
\r
internalclose(0);
\r
\r
end else begin
\r
- internalclose({$ifdef win32}getlasterror{$else}linuxerror{$endif});
\r
+ {$ifdef win32}
\r
+ if getlasterror=WSAEWOULDBLOCK then begin
\r
+ //the asynchronous nature of windows messages means we sometimes
\r
+ //get here with the buffer full
\r
+ //so do nothing in that case
\r
+ end else
\r
+ {$endif}
\r
+ begin
\r
+ internalclose({$ifdef win32}getlasterror{$else}linuxerror{$endif});
\r
+ end
\r
end;
\r
end;
\r
\r
end;
\r
end;
\r
\r