asynchronous

HTTP client example on win32

Dear All, I wanted to develop one HTTP example on win32 platform, which is asynchronous. I am new to win32 programming, can i know what are the api and library win32 platform provides for HTTP send and receive request. I am using windows xp with VS 2005. If any example is available directly on net please provide me link to it, wit...

Is it possible to create asynchronous web services in ASP.NET

I am not looking to be able to call web services asyncronously, I can already do that. What I want is to be able to create an asynchronous web service in a similar manner that I can create an asynchronous web page using the AddOnPreRenderCompleteAsync method. I have a web service that is dependent on another web service. I wish to be ab...

System.Net.Sockets.NetworkStream's Async read callback

I'm may be just misunderstanding something fundamental here but... Senario: I call System.Net.Sockets.NetworkStream's BeginRead method and my machine receives a response/request from a network device. The runtime runs my callback in its own thread. Before this thread can call EndRead, the machine receives another response/request. Ques...

How to get a silverlight dependency property when not on the UI thread?

I have essentially the same problem discussed here: http://khason.net/blog/dependency-property-getters-and-setters-in-multithreaded-environment/ public static readonly DependencyProperty MyPropertyProperty = DependencyProperty.RegisterAttached("MyProperty", typeof(bool), typeof(MyObject), new PropertyMetadata(new Propert...

What does a working example of dealing with packet fragmentation in C# look like when using the Begin* End* method?

After enough playing with asynchronous socket programming I noticed that the server was receiving chunked payloads (ie: more than one complete payload sitting in the same buffer). So I came up with the following: if (bytes_to_read > 0) { while (bytes_to_read > 0) // Get payload size as int. // Get payload in byte f...

Sockets: How to send data to the client without 'waiting' on them as they receive/parse it

I have a socket server, written in C++ using boost::asio, and I'm sending data to a client. The server sends the data out in chunks, and the client parses each chunk as it receives it. Both are pretty much single threaded right now. What design should I use on the server to ensure that the server is just writing out the data as fast...

Loading and parsing xml document freezes my GUI in Iphone

Hello, i'm building an app that will read rss feeds and will present them in UITableViews. I searched on google and here and ai decided to use LibXML. When my app starts it checkes if it has a valid internet connection, and grabs an rss feed from which i extract some data and i make an uiTabBar with tableViews. after parsing the first ...

Fast NIO, asynchronous HTTP Server for Java

Following on this question I am actually in the phase of finding the right HTTP container for one of my projects, too. I looked at several containers but I'm still not sure which one will be best suited for high load AJAX only requests. Apache Mina looks quite promising, but relatively complex as well. The asynchronous web server impleme...

Asynchronous message sender

I'm looking for a library that can send messages from a process. It needs to be asynchronous, reliable and ordered. I don't care if it drops messages when the queue is full, but it has be able to report that. It cannot be blocking. It should be possible to plug it into a standard app which already uses pthreads. (adding thread-safe to r...

How to kick off an asynchronus process?

I have a web form that once filled out needs to kick off a lengthy process. Since I don't want the user sitting there waiting for it to complete, I want to kick off the task and then take the user to another page to continue working. Would doing this involve using an asynchronus process, and if so, does someone have an example of how t...

Compact Framework 2.0: is it possible to abort an asynchronous Web Services call?

Hello! I have a custom control that make asynchronous Web Services calls. I wonder if I can dispose the control while an asynchronous call hasn't ended: I make the call, and before I get the response I dispose the object. What must I do before I get the response to dispose the custom control safetly? Thank you! ...

Alternative to BackgroundWorker that accepts more than one argument?

The BackgroundWorker object allows us to pass a single argument into the DoWorkEventHandler. // setup/init: BackgroundWorker endCallWorker = new BackgroundWorker(); endCallWorker.DoWork += new DoWorkEventHandler(EndCallWorker_DoWork); ... endCallWorker.RunWorkerAsync(userName); // the handler: private void EndCallWorker_DoWork(object ...

Is there a better way to update UI Element with Dispatcher?

Hi guys I'm a newbie with WCF services, and I'm trying to figure out if is there a better way to update a WPF UI element (like a Label control) when I'm calling asynchronously my WCF service. Here's a piece of code: private void button1_Click(object sender, RoutedEventArgs e) { int result; CalculatorServiceCli...

WPF: Asynchronous progress bar

I'm trying to create a progress bar that will work asynchronously to the main process. I'm created a new event and invoked it however everytime I then try to perform operations on the progress bar I recieve the following error: "The calling thread cannot access this object because a different thread owns it" The following code is an at...

How to handle message responses over (async) network communication (VB.NET)

I'm writing an app that sends messages over a network to another PC that processes the message and sends back a reply (e.g. a boolean or some other data). My network communication subs (based on WCF) just give me the ability to send a message to the other PC and process any received messages. The issue is that any response received is ...

How to create asynchronous method in c#

I have simple method in my C# app, it picks file from FTP server and parses it and stores the data in DB. I want it to be asynchronous, so that user perform other operations on App, once parsing is done he has to get message stating "Parsing is done". I know it can achieved through asynchronous method call but I dont know how to do that...

Calling a method when thread terminates

I have a form that starts a thread. Now I want the form to auto-close when this thread terminates. The only solution I found so far is adding a timer to the form and check if thread is alive on every tick. But I want to know if there is a better way to do that? Currently my code looks more less like this partial class SyncForm : Form ...

Using select/poll/kqueue/kevent to watch a directory for new files

In my app I need to watch a directory for new files. The amount of traffic is very large and there are going to be a minimum of hundreds of new files per second appearing. Currently I'm using a busy loop with this kind of idea: while True: time.sleep(0.2) if len(os.listdir('.')) > 0: # do stuff After running profiling I'm seei...

Asynchronous ObjectContext.SaveChanges() ?

Hi all! I want the SaveChanges of the ObjectContext (Win apps) to SaveChanges asynchronously, will show a marquee (or controllable?) progress bar (this I can easily implement) for the user while he is able to continue working. I basically want to override the SaveChanges of the ObjectContext. Has anyone thought about this before? ...

Do jQuery and Asynchronous calls together break the MVC Model?

I marked this as Community Wiki since this might be more on the philosophical side of things, but I've been thinking about this on and off for a while. Basically the idea is this: With MVC you have the controller that churns information, the model that carries it, and the view that displays it. It's a simple separation on paper. If I...