473,385 Members | 1,396 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,385 software developers and data experts.

DontLinger Dont work

Hi
Anybody had ever used this statement?
/////
SetSocketOption(SocketOptionLevel.Socket,SocketOpt ionName,DontLinger,new
LingerOption(false,0))
////

Whernver I use this will got a excption only has a message read
"OptionValue"


Nov 15 '05 #1
3 5308
L.J.SONG <Bc**********@hotmail.com> wrote:
Anybody had ever used this statement?
/////
SetSocketOption(SocketOptionLevel.Socket,SocketOpt ionName,DontLinger,new
LingerOption(false,0))
////

Whernver I use this will got a excption only has a message read
"OptionValue"


I would expect DontLinger to *not* take a LingerOption. Try passing
null instead, or use the version which takes an integer (passing 1, I
presume). I'd expect SocketOptionName.Linger to take a LingerOption
value.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #2
Thanks ,
I think so,DontLinger not take a LingerOption
but the follow is come from msdn

/*
To set the DontLinger socket option to false, create a LingerOption, set
the enabled property to false, and set the LingerTime property to the
desired time out period. Use this LingerOption along with the DontLinger
socket option to call the SetSocketOption method.
*/
Maybe document error?
"Jon Skeet [C# MVP]" <sk***@pobox.com> ????
news:MP************************@msnews.microsoft.c om...
L.J.SONG <Bc**********@hotmail.com> wrote:
Anybody had ever used this statement?
/////
SetSocketOption(SocketOptionLevel.Socket,SocketOpt ionName,DontLinger,new
LingerOption(false,0))
////

Whernver I use this will got a excption only has a message read
"OptionValue"


I would expect DontLinger to *not* take a LingerOption. Try passing
null instead, or use the version which takes an integer (passing 1, I
presume). I'd expect SocketOptionName.Linger to take a LingerOption
value.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 15 '05 #3
L.J.SONG <Bc**********@hotmail.com> wrote:
I think so,DontLinger not take a LingerOption
but the follow is come from msdn

/*
To set the DontLinger socket option to false, create a LingerOption, set
the enabled property to false, and set the LingerTime property to the
desired time out period. Use this LingerOption along with the DontLinger
socket option to call the SetSocketOption method.
*/
Maybe document error?


Hmmm... yes, could be. Sorry, I didn't see that before.

It strikes me as slightly odd that there are two different options,
DontLinger and Linger, to be honest - I'd have thought they could have
got away with one option including the "enable or disable" flag in the
option's value.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #4

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

Similar topics

5
by: James_Ptg | last post by:
hello people i have a file *.num and when i enter the full URL to download it he give my a 404 error ! but when i rename the *.NUM by *.TXT everything coming ok !? so how i can tell to IIS6...
2
by: Douglas | last post by:
I have a Vehicle MOT field in my table which i have as a Date field I dont really want to hold the year, just 'dd mmm' as MOTs are the same date every year. I have the field on my form as a...
1
by: Sebastian Sosna | last post by:
Hello NG! Iam trying to write Access Control Settings for Users in Active Dir. First what i do is to delegate a Trustee in a Container, with permissions. This works fine. Lets take Guests as...
24
by: Jazper | last post by:
hi i have this problem. i made a class deverted by CRootItem with implementation of IDisposable-Interface. i made a test-funktion to test my Dispose-Method.... but when set a breakpoint in my...
4
by: Brian Watkins | last post by:
Hello All, I have a a file display page that contains two frames. In the left frame is a tree view that lists a directory and all its subfolders. Each node in the left frames tree is a link...
5
by: raagz | last post by:
Hi, I am using the .NET validation controls for validating . The validation works fine with IE but none of them work with Netscape 6 browser. Do i have to configure something in vS.NET to...
2
by: tasiekk | last post by:
I have 1 lil problem. I make simple Win Forms app and i put there a tab control. There i make two pages. In each page i make 1 button. In tabpage1 button1 and in tabpage2 button2. And i make access...
19
by: so many sites so little time | last post by:
the table is head the colunm is called body <?php //show_site.php // This script retrieves blog entries from the database. // Address error handing. ini_set ('display_errors', 1);...
2
by: Tiruak | last post by:
Hi there. Thanks in advance for the people reading and trying to help. I'm very begginer using flash and action script, and I tryed to do this one navigation menu. Since I dont have experience...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: 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
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.