FD_ISSET not returning the read fdset when socket breaks in WinCE application

Hi,

  I have an voip application that uses winsock2. In PC when i do
FD_ISSET for readFds , it returns the read fdset when the socket
connection fails(network cable unplugged) and hence when i try to do a
read operation on the returned set, i get an error.Thus enabling me to
detect the socket failure in PC.

 However the same application when run in WinCE device, using the same
Winsock2, does not behave the way mentioned above. I am unable to
detect the socket failure in the WinCE device.

Why is it that the same winsock api behave differently in PC and WinCE
based device though the winsock2 apis are the same ?

Expecting a positive response.

Regards,
Ani
0
7/11/2008 5:51:17 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
312 Views

Similar Articles

[PageSpeed] 22

Presumably your WinCE device is running on an x86, otherwise it can't be the same winsock2
dll.  For that matter, it is not clear that even on an x86 CE platform, it is necessarily
the same winsock2 dll.  However, winsock2 is not "the same" if you are talking about going
beyond an abstraction; you have to think about the code itself.  Since winsock is merely a
high-level interface to the low-level hardware device driver, you have to postulate that
the network device drivers are identical, which they certainly are not (winCE has a
slightly-different device driver model, and in addition, I have no idea if the network
stacks are implemented in the same way at any level, between the two operating systems).
So your problem could be a winsock2 implementation issue, a device driver issue, a network
stack issue, etc., etc.   There are so many differences between a desk-based PC and a
CE-based device that it is not at all surprising that there would be differences in the
network implementations starting from winsock and going all the way down to the details of
the hardware device.  So there is no reason to expect that at the subtle detail level that
two different implementations of the same abstract specification will differ.  For
example, a CE device, usually being portable and wireless, may well have a network stack
that expects to lose communication from time to time and therefore behaves differently,
for reasons which appeared to be good at the time to the implementors.

I have not read the winsock2 spec carefully, but what, exactly, does it say about the
response to unplugging a cable or losing a connection?  Down to the level of the exact
time constants involved?  If there is no specification, then it is the decision of the
coders of the many, many levels that lie between the API level and the device hardware
registers to make a decision about how they will respond to unspecified events and
conditions.  A careful spec about what it means to "lose a connection" may be what is
missing, leaving it up to the implementors to make a decision.

You might have an issue with the low-level device driver, or the network stack, and would
have to discuss these issues with the designers of those components.
						joe

On Thu, 10 Jul 2008 22:51:17 -0700 (PDT), KK <anishaparveen@gmail.com> wrote:

>Hi,
>
>  I have an voip application that uses winsock2. In PC when i do
>FD_ISSET for readFds , it returns the read fdset when the socket
>connection fails(network cable unplugged) and hence when i try to do a
>read operation on the returned set, i get an error.Thus enabling me to
>detect the socket failure in PC.
>
> However the same application when run in WinCE device, using the same
>Winsock2, does not behave the way mentioned above. I am unable to
>detect the socket failure in the WinCE device.
>
>Why is it that the same winsock api behave differently in PC and WinCE
>based device though the winsock2 apis are the same ?
>
>Expecting a positive response.
>
>Regards,
>Ani
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
7/11/2008 3:35:38 PM
On Jul 11, 8:35=A0pm, Joseph M. Newcomer <newco...@flounder.com> wrote:
> Presumably your WinCE device is running on an x86, otherwise it can't be =
the same winsock2
> dll. =A0For that matter, it is not clear that even on an x86 CE platform,=
 it is necessarily
> the same winsock2 dll. =A0However, winsock2 is not "the same" if you are =
talking about going
> beyond an abstraction; you have to think about the code itself. =A0Since =
winsock is merely a
> high-level interface to the low-level hardware device driver, you have to=
 postulate that
> the network device drivers are identical, which they certainly are not (w=
inCE has a
> slightly-different device driver model, and in addition, I have no idea i=
f the network
> stacks are implemented in the same way at any level, between the two oper=
ating systems).
> So your problem could be a winsock2 implementation issue, a device driver=
 issue, a network
> stack issue, etc., etc. =A0 There are so many differences between a desk-=
based PC and a
> CE-based device that it is not at all surprising that there would be diff=
erences in the
> network implementations starting from winsock and going all the way down =
to the details of
> the hardware device. =A0So there is no reason to expect that at the subtl=
e detail level that
> two different implementations of the same abstract specification will dif=
fer. =A0For
> example, a CE device, usually being portable and wireless, may well have =
a network stack
> that expects to lose communication from time to time and therefore behave=
s differently,
> for reasons which appeared to be good at the time to the implementors.
>
> I have not read the winsock2 spec carefully, but what, exactly, does it s=
ay about the
> response to unplugging a cable or losing a connection? =A0Down to the lev=
el of the exact
> time constants involved? =A0If there is no specification, then it is the =
decision of the
> coders of the many, many levels that lie between the API level and the de=
vice hardware
> registers to make a decision about how they will respond to unspecified e=
vents and
> conditions. =A0A careful spec about what it means to "lose a connection" =
may be what is
> missing, leaving it up to the implementors to make a decision.
>
> You might have an issue with the low-level device driver, or the network =
stack, and would
> have to discuss these issues with the designers of those components.
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 joe
>
>
>
>
>
> On Thu, 10 Jul 2008 22:51:17 -0700 (PDT), KK <anishaparv...@gmail.com> wr=
ote:
> >Hi,
>
> > =A0I have an voip application that uses winsock2. In PC when i do
> >FD_ISSET for readFds , it returns the read fdset when the socket
> >connection fails(network cable unplugged) and hence when i try to do a
> >read operation on the returned set, i get an error.Thus enabling me to
> >detect the socket failure in PC.
>
> > However the same application when run in WinCE device, using the same
> >Winsock2, does not behave the way mentioned above. I am unable to
> >detect the socket failure in the WinCE device.
>
> >Why is it that the same winsock api behave differently in PC and WinCE
> >based device though the winsock2 apis are the same ?
>
> >Expecting a positive response.
>
> >Regards,
> >Ani
>
> Joseph M. Newcomer [MVP]
> email: newco...@flounder.com
> Web:http://www.flounder.com
> MVP Tips:http://www.flounder.com/mvp_tips.htm- Hide quoted text -
>
> - Show quoted text -

thank you very much for your inputs..amlooking into those details and
discussing the issue with corresponding teams..thank u/
0
7/14/2008 10:26:10 AM
Reply:

Similar Artilces:

Read it and weep, GuthBall
You were totally wrong again http://www.space.com/55-earths-moon-formation-composition-and-orbit.html On Mar 1, 12:32=A0pm, "Hagar" <hs...@yahoo.com> wrote: > You were totally wrong again > > http://www.space.com/55-earths-moon-formation-composition-and-orbit.html ? Does this mean rednecks believe anything that's in NASA approved print, and as long as it's redneck and Semite approved? Why did they remove all the colors/hues of those lunar minerals? Why did they remove them stars and especially other colorful planets? Where's all the sodium? Even ...

Lookup Values, return multiple.
I need help please. The formula I require has to in Worksheet A :- [B1] lookup DATA in Worksheet A [A1] SP001 in worksheet B [A] [B] [C] SP001 PL001 16 SP001 PL002 5 SP001 DR001 10 CR001 PL001 2 Search for all Text String starting with "PL" in Worksheet B [B] only for SP001 in [A] and return with values from Worksheet B [C] 16 and 5 I need the values to be seperated and not summed. Tx. Appreciate assistance. Try this... In the formulas: Rng1 refers to worksheet B $A$2:$A$5 Rng2 refers ...

% Return Line graph?
Hi- Can someone show me how to customize a graph in Money 2005 to show my stock portfolio's % change over time? I just want a simple line chart showing my percentage change since the beginning - as a way to just figure out relative performance but I can't seem to find the right graph to customize. I can't just chart the value of the portfolio as I have been adding money to it over time which has drastically changed the % returns. I am not sure if what I want is possible or if this is clear but I also have the plugin for MS Excel that I can import money data so if there is...

why can't I move page breaks in XP Office
after several install/reinstall I still can not move page breaks with mouse WHY????? ...

Read session from module
I created a hhtpModul. If I call aspx page, it works. If I call asp page it doesn't work. I'm using OnAcquireRequestState event and I would like to check if there is active session. But I get an error that ctx.Session is null. Is there any other option to check if session is active? Maybe read sessionID from cookie and check if this ID is active on IIS server? How can I do that? Thank you for your answer. private void OnAcquireRequestState(object sender, EventArgs e) { HttpApplication app = (HttpApplication)sender; HttpContext ctx = ap...

kit item return
There should be an option in the Store Op Manager --> Configuration --> Option Tab to allow the ability when returning a Kit Item to either return the quantity back to the Kit Items Inventory or to the Kit Item COMPONENTS Inventory. Effectively breaking out the Kit Item automatically when the item is returned to inventory. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to op...

Formula that returns the sheetname
Does anyone know of a formula that would return the active sheetname? http://www.mcgimpsey.com/excel/formulae/cell_function.html "TimT" wrote: > Does anyone know of a formula that would return the active sheetname? Great Link! The formula was =MID(CELL("filename",A1), FIND("]", CELL("filename", A1))+ 1, 255) ....yeah, like I was gonna figure that one out on my own. "David Hepner" wrote: > http://www.mcgimpsey.com/excel/formulae/cell_function.html > > > "TimT" wrote: > > > Does anyone know of a form...

Function to Return the IP Address of a known Host
Hi People, This function returns the IP Address of a known host. I hope you find it useful. Function xlGetIPAddress(strHost As String) 'Ping a host to see if it is alive Dim objPing Dim objRetStatus Dim strMessage If strHost = "" Then xlGetIPAddress = False Else Set objPing = GetObject("winmgmts: {impersonationLevel=impersonate}").ExecQuery("select * from Win32_PingStatus where address = '" & strHost & "'") For Each objRetStatus In objPing If IsNull(objRetStatus.StatusCode) Or objRet...

Server error in '/' Application 08-16-03
When I want to save some information (web based) like a quick Contact, I receive the following error: Server Error in '/' application. A potentially dangerous Request.Form value was detected from the client ............ anyone an idea ? Thx Hi Everyone, I was having the same error when trying to edit my Business Unit(New Install). I tried your suggested fix but now I cannot open the CRM app from the browser (server nor client) It opens up the IIS default page. How can I correct this? Help!!! Thanks, Jaime >-----Original Message----- >You need to uninstall the 1.1 .N...

If it returns #N/A, making it return 0
I have a list of numbers, that at the end of their row it averages them. However, the numbers are obtained by a VLOOKUP function. If it can't find what it's looking for, it returns #N/A which makes it so it can't calculate the average at the end. Is there any way to get the VLOOKUP function to return 0 instead of #N/A? Or maybe make the cell return 0 if the VLOOKUP function returns #N/A? ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ Also, if it return...

a function which accepts a number and returns it in words
In Excel is there a function which accepts a number and returns it in words, eg myFunction(15) return "fifteen" http://xldynamic.com/source/xld.xlFAQ0004.html -- Kind regards, Niek Otten Microsoft MVP - Excel "aa" <A@aa.com> wrote in message news:ulnsf%23xXHHA.4220@TK2MSFTNGP03.phx.gbl... | In Excel is there a function which accepts a number and returns it in words, | eg myFunction(15) return "fifteen" | | Bob Phillips' site for help on this. http://www.xldynamic.com/source/xld.xlFAQ0004.html or Bernd Plumhoff's site http://www.s...

Outlook read receipts not go to specified folder
Using Office 2003 (11.5608.5703) with WindowsXP Pro. Notifications that sent emails have been read do not go into the specified folder, rather, they remain in the inbox. Anyone know what causes this? Thanks, Keith ...

Improving Pete'r Application Performance
[Starting a new topic because the thread is really deep] Peter Olcott wrote: > I am really only using the term OCR in a figurative sense. > My technology is entirely different than OCR in that it is > completely deterministic rather than stochastic. It is based > on a deterministic finite automaton. The DFA is the > recognizer, and comprises most of my memory requirements. > necessarily this architecture would be memory bandwidth > intensive. Transitioning from one DFA state to another > mostly involves reading memory, this is inherent in the way ...

error message messaging inerface has returned an unknown error
how do i remove the error message "messaging interface has t=returned an unknown error" from oganinze window. restatring outlook does not help. ...

Lookup returns text?
Is there a function similar to SUMIF for numerical data that will retur text? I have a list of item #'s that have no description. I want to be abl to lookup the item # and return the description from a master list. Any ideas? TEXTIF would be great, but that doesn't exist that I'm aware of. Thanks, Rya -- Message posted from http://www.ExcelForum.com Ryan Check out the Help for VLOOKUP Regards Trevor "rydolarue >" <<rydolarue.1b8xeb@excelforum-nospam.com> wrote in message news:rydolarue.1b8xeb@excelforum-nospam.com... > Is there a function simil...

Please help
I have a query that returns text. SOME text is just text but some text has a number like X1027 - in front of the text. It might read like "X1027 - Jonesboro High School". The text lengths vary from school to school and some don't have the numbers in front. How can I remove the numbers, spaces, and - in front of the ones that do and leave alone the ones that don't. Help!!! Thanks so much!!!!!! "Golfinray" <Golfinray@discussions.microsoft.com> wrote in message news:93B7A4A5-7287-409C-AA89-200820C8DF5A@microsoft.com... >I have a query that returns text....

Reading dbf files
Hi: In Excel 2003 in Spanish version, when I open a file with "dbf" extension, Excel assigns by default a name to the range which is "Base de Datos". When I try to select this name, a message appears saying there�s an error with the name. Investigating, I saw that the range names must not have blank apaces between the words, so the default name must be "Base_de_Datos" I think this is a bug in the Spanish version of Excel. In the Portuguese version the default name is "Banco_de_dados". I use dbf files in Excel to work with Pivot Tables. Any suggestion...

Breaking out rows of data, sequentially, into headered columns
Merry Christmas everyone, I highly respect the great minds that solve the many Excel riddles that are posted on this newsgroup. I hope you are all having a great holiday. If anyone is so inclined or feels like solving one on their return, here is my issue... I have existing code below that is quite useful for its former purpose, but I wonder if it could be modified to suit a new application. It probably just needs a little tinkering, but who knows. 1) My raw data consists of sequential (already sorted) numbers in column A, running for unspecified (varying, that is) lengths of...

shared note book in read only mode in vista
I have just created a new shared notebook on my pc and there are 5 other computers accessing it. 3 are windows XP Pro, and two are Windows 7 pro. All can access edit and update without any problem. However there is one other pc that has Vista on it and it can see and open the shared notebook, but it shows in read only mode. We have checked the permissions, and are now at a loss to know what to do. Does anyone have any ideas, please? -- thanks in advance Trevor -------- Original-Nachricht -------- > I have just created a new shared notebook on my pc and there are 5 ...

Acts like there's a "Break" in code when there isn't
Hi - I have an Access 2003 application I developed that I've been using for probably 1 year without any problems. I recently modified the code that was executed when one of the command buttons is clicked. While doing the modifications, I inserted a break and stepped through the code several times to find a problem I was having. Now I have removed the break, but when I click the button VBA opens up and the code stops until I hit play or step through it. Also, I can close the code and hit the command button again and it will run without stopping. The problem has carrie...

Return
I bought "Essentials" but later found that my previous version of Money does not import. I would like to upgrade to "Delux" so that I can use my previous data. I bought the program and downloaded it a few days ago and an now trying to return it but to no avail. The help page states that there is a "Request a Return" tab but there is no such button only a "view inoice" tab. Where can I upgrade or return the "Essentials"? In microsoft.public.money, Bryan wrote: >I bought "Essentials" but later found that my previous versio...

default read receipt?
Is it possible to have a read reciept and delivery receipt set as default all outgoing emails??? The Knowledge Base article at http://support.microsoft.com/default.aspx?scid=kb;en- us;192929&Product=out answers your question. >-----Original Message----- >Is it possible to have a read reciept and delivery >receipt set as default all outgoing emails??? >. > Thanking You!! >-----Original Message----- >The Knowledge Base article at > >http://support.microsoft.com/default.aspx?scid=kb;en- >us;192929&Product=out > >answers your question. > ...

Total Return YTD #2
Question AT 3pm today my total return ytd was 3.9%. I entered a CD i purchased today and total return YTD went down to 3.5% with no material change in anything else in my portfolio. In my opinion this would render the total return useless. Am I missing something? Thanks in advance for any help ...

Office read only in outlook only
I am having a problem with Outlook 2002 and a user profile. The user loggs into locations and everwhere she loggs into the Outlook gives her office read only files. She can send the file and it becomes read only. She can send to any user possible but the file comes up as normal. Any user can read the file as normal, but she cannot. she opens the file seperatley it will read regular, but when opened through Outlook it is read only. Please Help!!!!!!!!!!!!!!!!!!!!!!!! ...

How can I read emails from other employees mailboxes on Exchange 2003
I have exchange 2003, how can I check my employee's emails without resetting their passwords... I would like to be able to check multiple employee's emails periodically. I installed outlook on my exchange server and I granted myself full rights to a specific mailbox is there a better way? I would like to open outlook and be able to pick any of the mailboxes profiles from a drop down box from the AD. Is that possible? THANK YOU! On Wed, 30 Mar 2005 13:08:07 -0500, "mardskee" <amigo@elitemg.com> wrote: >I have exchange 2003, how can I check my employee's...