I has created the .NET Compact Framework
project (Windows CE Console Application)
and wrote this code
Socket socket = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
try
{
socket.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.ReceiveTimeout, -1);
}
catch(SocketException e)
{
...........
}
and exception occured - "An unknown, invalid, or unsupported option
or level was specified in a getsockopt or setsockopt call"
Where is the problem???
It could very well be the -1, is it a valid value for a timeout? I
think that you are trying to set it to infinite, but it might not like that.
Does it work with any other value? Perhaps sockets on CE don't support an
infinite timeout.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- nicholas...@exisconsulting.com
"Vladimir Zinin" <zi...@eldos.org> wrote in message
news:b1dktu$pfp$1...@news.dg.net.ua...
>Vladimir,
> It could very well be the -1, is it a valid value for a timeout? I
>think that you are trying to set it to infinite, but it might not like
that.
>Does it work with any other value? Perhaps sockets on CE don't support an
>infinite timeout.
> Hope this helps.
No. When value for example = 100
socket.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.ReceiveTimeout, ***100***);
than exception throws too :-(.
Vladimir.
SocketOptionName.SendTimeout);
than result is (-1).
Vladimir.
If this is the case, then it might be that this option is not supported
by the compact framework.
--
- Nicholas Paldino [.NET/C# MVP]
- nicholas...@exisconsulting.com
"Vladimir Zinin" <zi...@eldos.org> wrote in message
news:b1e1bb$1dfa$1...@news.dg.net.ua...
> Vladimir,
>
> If this is the case, then it might be that this option is not
supported
> by the compact framework.
>
But MSDN sad that ReceiveTimeout option
supported by the .NET Compact framework
Vladimir.