"Gregory Hassett" <gh******@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hello,
Does anyone know how to get the maximum size of a datagram for a UDP
Socket
created via .NET's System.Net.Sockets.Socket class?
Thanks!
The maximum UDP Datagram size is determined by the underlying transport and
the subnet, .NET (or more exactly the Winsock library) has nothing to do
with this. The max. size can never exceed 64Kb, to get the max. size of the
outbound (send) message supported by the local transport provider (note
"local provider" here ! that means that the value returned is not
necessarily the message size that can be used end-to-end), you'll have to
call GetSockopt through PInvoke. Note that there is no way to get the
receive max. message size.
Willy.