473,779 Members | 2,041 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Completion port & winsock problem.

Hi,

Introduction:
*************** **********
I am developing communication infrastructure for a streaming video server,
to achieve optimal performance I use IO Completion ports & a thread pool in
combination with winsock MsAPI ( e.g. ConnectEx, AcceptEx, … ), sending data
through sockets is done with Read/WriteFile.

The problem:
*************** **********
Upon IO Completion of any kind ( e.g. Socket Connection completion , socket
data reception , … ) I get double completion notifications, in other words:
GetQueuedComple tionStatus returns twice for the same IO operation…

I guess I am not the first encountered this problem…
Does someone have a clue what may cause this problem?

Any pointer, comment or remark would be appreciated.

Naddav
http://www.sophin.com
Nov 17 '05 #1
1 1697
"Nadav" <Na***@discussi ons.microsoft.c om> wrote in message
news:49******** *************** ***********@mic rosoft.com...
The problem:
*************** **********
Upon IO Completion of any kind ( e.g. Socket Connection completion ,
socket
data reception , . ) I get double completion notifications, in other
words:
GetQueuedComple tionStatus returns twice for the same IO operation.

I guess I am not the first encountered this problem.
I don't know why you think that.
Does someone have a clue what may cause this problem?

Any pointer, comment or remark would be appreciated.


You will probably need to post the smallest snippet of code that you can get
to exhibit the problem in a more appropriate group, e.g.

microsoft.publi c.win32.program mer.kernel

Regards,
Will
Nov 17 '05 #2

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

Similar topics

21
15728
by: Alexander N. Spitzer | last post by:
If I have a machine with 3 virtual IP addresses (192.168.1.), how can I start 3 instances of the same RMI application (each started with different properties/configs), each listening on the port 1234, but each instance binds to a different ip address. that is to say: instance #1 binds to 192.168.1.5/port 1234 instance #2 binds to 192.168.1.6/port 1234 instance #3 binds to 192.168.1.7/port 1234
5
4362
by: Keith | last post by:
I am trying to write a simple FTP client, but I am having trouble with the PORT Command. Does anyone know how to Get an IP Address and port number to establish a data port for the server to connect to. Any info would be appreciated.
0
323
by: andy | last post by:
My Winsock app works fine when compiled using VC++ 6 compiler, however I get runtime exceptions under heavy load if I recompile using Visual Studio .NET, the exceptions point to "GetProcessHeap()" function. Is there any such VS .NET C++ known issue? Also, is it possible to write Winsock IO Completion Ports in C#? could not find any info on MSDN. please advise, many thanks,
8
3353
by: MLH | last post by:
I wrote a letter to NIST in Boulder, Colorado asking how to glean time/date from their servers from inside an Access 97 app and VBA. Their reply is shown below. Trouble is, I do not know how to do what they've recommended. Anybody on this forum know what is specifically needed? xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Hello,
0
286
by: Nadav | last post by:
Hi, Usage of FileStream ( and other stream related objects ) internally use an IO Completion port, Now, Taking that in mind, does all of the stream object of a certain process use a single IO Completion port common to all streams ( file based streams, e.g. socket, file, ... )? This could easily done with Win32 API by creating a single IO Completion port and associating it with several file based objects ( e.g. several sockets ). Usage of a...
2
2149
by: William GS | last post by:
Hello, my app sends and receives messages over a local area network using WinSock, so I need a Port, How can I get an unused port? It must work with VC6 and Win98/ME too. Thanks in advance, William GS
0
2460
by: ckp21082 | last post by:
I want to develop an application that constantly read Com port Read data comming from COM Port and transfer that data to another computer using Winsock so Hyper Terminal can read it. I am able to transfer data using Winsock but i can not able to read COM Port continously manner so I can get data. I think it is due to COM Port can be opened at once. Can You give me such code so that i can listen COM Port. I Just want to listen data and...
11
8619
by: atlaste | last post by:
Hi, In an attempt to create a full-blown webcrawler I've found myself writing a wrapper around the Socket class in an attempt to make it completely async, supporting timeouts and some scheduling mechanisms. I use a non-blocking approach for this, using the call to 'poll' to support the async mechanism - rather than the 'begin' and 'end' functions. I already found that connecting doesn't set the "isconnected" variable correctly...
0
1347
by: Julien Ghaye | last post by:
Hi everyone, Actually, I'm coding some kind of a http client. Here is my problem. When I create and destroy many sockets (one after another) without specifying the local port to bind, It seems that this local port is not free after using the function closesocket(). So, How can I free it ?
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10306
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9930
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.