473,378 Members | 1,416 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

SetSocketOption fails for SocketOptionName ReceiveTimeout

I have been working with KB Article 812404 "HOW TO: Write
Pluggable Protocol to Supprot FTP in Managed Classes by
Using Visual Bassic.NET".

I have modified the code to run on a Pocket PC. In the
OpenControlConnection routine the following lines are
being executed:

m_DataSocket.SetSocketOption
(SocketOptionLevel.Socket, SocketOptionName.SendTimeout,
m_ConnectTimeout)
m_DataSocket.SetSocketOption
(SocketOptionLevel.Socket,
SocketOptionName.ReceiveTimeout, m_DataReceiveTimeout)

The SendTimeout one works. The ReceiveTimeout fails with:
---------------------------------------------------------
An unhandled exception of
type 'System.Net.Sockets.SocketException' occurred in
System.dll

Additional information: An unknown, invalid, or
unsupported option or level was specified in a getsockopt
or setsockopt call
----------------------------------------------------------

I assume this works with regular projects. The
documentation says that ReceiveTimeout is supported by the
compact framework.

Am I running into a bug in the compact framework?
Jul 19 '05 #1
0 4381

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ivar | last post by:
Hi, Is SocketOptionName.ReciveTimeout usable with asyncronous socket methods ? With Recive method it works but BeginRecive can't get it working.
0
by: Edward Diener | last post by:
After calling mySocket.Bind(someEndpoint) to an IP endpoint I immediately attempt to get the MaxConnections allowed through...
0
by: Michi Henning | last post by:
The help page for SocketOptionName says, toward the end: "Example The following example uses the Linger enumerated value to set the linger time of the Socket." However, the example does not...
2
by: Wencheng Magiya | last post by:
By setting socket.SetSocketOption(SocketOptionLevel.Socket,SocketOptionName.KeepAlive, 1 ) can tell the socket to use keep-alives. But anybody know how to set the timeout for the keep-alive...
0
by: Nathan Kerr | last post by:
I have been working with KB Article 812404 "HOW TO: Write Pluggable Protocol to Supprot FTP in Managed Classes by Using Visual Bassic.NET". I have modified the code to run on a Pocket PC. In the...
2
by: djc | last post by:
I read a network programming book (based on framework 1.1) which indicated that you should 'never' use the RecieveTimeout or the SendTimeout 'socket options' on TCP sockets or you may loose data. I...
3
by: Ryan Liu | last post by:
Hi, I use Server: Use an endless thread to lisiten to clients requests: while(true) { TcpClient client = myListener.AcceptTcpClient();
0
by: morgan22 | last post by:
Hi I'm trying to build a sniffer-like application and I'm using this code : Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Raw,...
1
by: =?Utf-8?B?aXdkdTE1?= | last post by:
hi, im trying to send a broadcast out to my network using a UDP socket. heres how i initialize it. Dim soc As New Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.Udp) i get...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.