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

endsend not being invoked

Hello all-

I don't know if anyone has run into this sort of a problem before, but
I'm running out of ideas, so I thought I'd post this:

I have a multithreaded server application that accepts socket
connections from clients. The server is responsible for broadcasting
string-based messages to any connected clients as it receives these
messages (from a 3rd-party source).

The socket server aspect of the application implements the
asynchronous socket model. Using performance monitor, I noticed that
the application's memory usage would begin to start creeping up as a
function of messages broadcast to connected clients. I used the .NET
memory profiler from SciTech to try and pinpoint the problem. It
turned out that there were 3 types of objects not getting cleaned up
and causing my memory leak: OverlappedAsyncResult, Overlapped, and
byte[] (the raw data of the messages being broadcast).

So, then I ran the application in debug mode and reproduced the issue.
What I was able to discover thus far is that for some period of time,
the application will invoke the delegate I specify for BeginSend, as
it should. THEN, after that period of time, it appears that the
delegate is no longer invoked on subsequent calls to the BeginSend
method. This would seem to explain the memory leak, as my
corresponding calls to EndSend would no longer be invoked where,
presumably, cleanup of OverlappedAsyncResult, Overlapped, and byte[]
take place.

Anyway, I puzzled over this for a while and then discovered that after
I terminated my clients' socket connections, THEN the delegate
invocations that seemed to be missing beforehand actually came
through! This leads me to believe that somehow, asynchronous
invocations to the delegate specified in my call to BeginSend are
somehow queuing up.

Does this issue sound at all familiar to anyone out there? If so, any
insights would be greatly appreciated!!
Nov 15 '05 #1
0 2604

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

Similar topics

4
by: Charles Jamieson | last post by:
I declare a class class myClass{ public: ~myClass();
2
by: David N | last post by:
Hi All, The OnLoad() event is invoked automatically when a form is being loaded. Do we have another event that is invoked automatically after a form has completed loading? Thanks.
0
by: Ken Foster | last post by:
In another message thread and also in a message thread on a completely different board, there have been references to BeginSend/EndSend not sending a full message all the time. I know EndReceive...
0
by: RAJ | last post by:
This event appears to be invoked twice for absolutely no reason on only one of my ASP.Net web user controls. Although I've now overcome the problem by overriding the base classes OnLoad routine, I...
0
by: Anders W | last post by:
Hi, I'm writing a server application, using sockets (TCP) for communication. When receiving requests I'm using BeginReceive/EndReceive, and I'm handling defragmented messages. My question is:...
5
by: Bill | last post by:
This database has no forms. I am viewing an Access table in datasheet view. I'd like to execute a macro to execute a function (using "runcode"). In the function, I'll reading data from the record...
31
by: Zytan | last post by:
Everything (er, every class) in C# has ToString() which is conveniently automatically invoked when using it in Debug.WriteLine() or in a string concatenation, etc. I made a struct, and I want to...
9
by: johkar | last post by:
I need some browser implementation clarification. In the below example, the alternate stylesheet could be invoked by user agents that support alternate stylesheets or by script. Are there any...
7
by: Nick | last post by:
Hi there, Is it possible to tell how a WebMethod was invoked? For example I would like to determin if it was invoked via SOAP or HTTP Post. Other than creating 2 methods I am no sure if I can...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.