473,326 Members | 2,076 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,326 software developers and data experts.

listener.BeginGetContext and System.Net.Sockets.TcpClient

I am issuing multiple listeners using BeginGetContext and there are multiple
Sockets that get communcation done.

For i As Int16 = 0 To 9
' Allow up to 10 simultaneous requests.
listener.BeginGetContext(New AsyncCallback(AddressOf request), listener)
Next

My application accepts data received on the context, spins off a new thread,
releases the listerner, then it attaches to an available Socket to send
(write) the data over to another server.

The problem happens when I do a System.Net.Sockets.TcpClient.Receive and
wait for response data on the socket, it blocks the entire process from
firing any other listener so the program literally freezes until the Receive
is complete (10 seconds in some cases)?! This obviously slows down processing
dramatically and makes the program almost useless.

I have tried every technique I can think of to work around this issue, but
it remains.

Any help is appreciated.
--
SteveS
Oct 9 '07 #1
0 1756

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

Similar topics

4
by: Sagaert Johan | last post by:
i get this error if i write this : using System.Net.Sockets; .... .... TcpClient tcp; tcp=new TcpClient();
0
by: Torsten Brasch | last post by:
Hi All and Happy New Year ;) I have a very strange problem with System.Net.Sockets.TcpClient(). For some reason, the number of bytes I can receive is limited to 5460 bytes. I made sure that the...
4
by: BadOmen | last post by:
Hi, What is the different between 'System.Net.Sockets.Socket' and 'System.Net.Sockets.TcpClient'? When do I use System.Net.Sockets.TcpClient and System.Net.Sockets.Socket?? Yours, Jonas
8
by: Terry Olsen | last post by:
I've tried the following code straight out of MSDN. But my app still blocks while listening. Isn't this code supposed to keep the UI responsive while listening? Or maybe I'm not doing it...
3
by: Geoff | last post by:
I need to keep a few VB6 tcpClients active, but have them talk to a dotNet tcpServer/tcpListener. The "Server"/Listener is running as a Plugin, and needs to respond to "outside requests". The...
3
by: Jerry Spence1 | last post by:
I have been looking at examples of code to create a simple TCP listener on a certain port. However they all start off with this line: Dim tcpListener As New TcpListener(portNumber) When I...
1
by: larspeter | last post by:
Hi all. I have a problem with TcpClient ... I am conneting to a server with TcpClient and returning the answer through a webservice. It actully all works fine. BUT if I make a lot of...
0
by: =?Utf-8?B?U3RldmVT?= | last post by:
I have an application that listens on multiple context listeners. When I get a request on a listening, I get the Data Received and then write it on a socket to another server and read the socket...
9
by: Markgoldin | last post by:
Here is my code to create a TCP listener: file name DataAdapterLauncher.cs public static TcpListener tcpl; IPEndPoint ipe = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 1024);//listen on all local...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.