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

Managing Bandwidth with C#

I'm writing an application that's bandwidth intense.

My available bandwidth is 1.5Mbps (cable modem) and I know
I can reach around 1.4Mbps, if not more.

The application I am writing right now simply connects to a
newsgroup and downloads the headers. It doesn't do any more
specific programmming after that. However, the app will
use, at most, 100kbps bandwidth. I'm hoping that it can run
much faster than that and reach somewhere close to the 1.
4Mbps maximum.

Is there any way I can use C# to increase this bandwidth
aside from multi-threading and connecting multiple times to
the news server? I hope so... I welcome any input.

Thank you.
Nov 15 '05 #1
9 5916
Chibi,

If there is such an option, then you will probably have to set the
individual socket properties (however, I don't know of any offhand,
otherwise, I would have offered it).

Also, you are limited by the bandwidth on the other end as well. Do you
know that the NNTP server on the other end can support that throughput?

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Chibi" <an*******@discussions.microsoft.com> wrote in message
news:07****************************@phx.gbl...
I'm writing an application that's bandwidth intense.

My available bandwidth is 1.5Mbps (cable modem) and I know
I can reach around 1.4Mbps, if not more.

The application I am writing right now simply connects to a
newsgroup and downloads the headers. It doesn't do any more
specific programmming after that. However, the app will
use, at most, 100kbps bandwidth. I'm hoping that it can run
much faster than that and reach somewhere close to the 1.
4Mbps maximum.

Is there any way I can use C# to increase this bandwidth
aside from multi-threading and connecting multiple times to
the news server? I hope so... I welcome any input.

Thank you.

Nov 15 '05 #2
Nicholas,

Thanks for your reply.

As for the other end, using a newsreader, I can constantly
reach 1.4Mbps. I tested both applications (the one I'm
writing and the one I'm currently using) side by side and
the current newsreader never has any speed issues. Of
course, I'm not running both simultaneously.

I will have to look into socket properties now. At least
you got me thinking a bit.

I appreciate your help and hope you or anyone else reading
this can help me find a good solution.

Thank you!

-----Original Message-----
Chibi,

If there is such an option, then you will probably have to set theindividual socket properties (however, I don't know of any offhand,otherwise, I would have offered it).

Also, you are limited by the bandwidth on the other end as well. Do youknow that the NNTP server on the other end can support that throughput?
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Chibi" <an*******@discussions.microsoft.com> wrote in messagenews:07****************************@phx.gbl...
I'm writing an application that's bandwidth intense.

My available bandwidth is 1.5Mbps (cable modem) and I know I can reach around 1.4Mbps, if not more.

The application I am writing right now simply connects to a newsgroup and downloads the headers. It doesn't do any more specific programmming after that. However, the app will
use, at most, 100kbps bandwidth. I'm hoping that it can run much faster than that and reach somewhere close to the 1. 4Mbps maximum.

Is there any way I can use C# to increase this bandwidth
aside from multi-threading and connecting multiple times to the news server? I hope so... I welcome any input.

Thank you.

.

Nov 15 '05 #3
Hi Chibi,

IIRC a TCP connection speed is dependand of several factors, in general
it's as fast as the bandwith allow, creating more connection will not help
the speed of the first, al least of course that you have some bandwidth
control system in place.

I'm also curious of how you calculate the bandwidth of both the
applications.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Chibi" <an*******@discussions.microsoft.com> wrote in message
news:07****************************@phx.gbl...
I'm writing an application that's bandwidth intense.

My available bandwidth is 1.5Mbps (cable modem) and I know
I can reach around 1.4Mbps, if not more.

The application I am writing right now simply connects to a
newsgroup and downloads the headers. It doesn't do any more
specific programmming after that. However, the app will
use, at most, 100kbps bandwidth. I'm hoping that it can run
much faster than that and reach somewhere close to the 1.
4Mbps maximum.

Is there any way I can use C# to increase this bandwidth
aside from multi-threading and connecting multiple times to
the news server? I hope so... I welcome any input.

Thank you.

Nov 15 '05 #4
Ignacio,

My calculation is not very scientific. Basically, I'm
using both applications to download only headers from the
same newsgroup and news server. With the application I've
written, I've calculated 100 headers in about 30 seconds.
With the commercial application, 100 headers download at
about 2-3 seconds.

Also, it is possible to measure ballpark figures by
calculating number of lines in each header and multiply it
by average number of characters per line.

Obviously, I didn't use a calculator to calculate exact
figures but by the measurements I pointed out above,
there's a huge difference in speed in what I wrote and
what the other application can do. I would like to know
how I can get figures closer to those of the commercial
application.

Any suggestions would be kindly welcomed.

Thank you.

-----Original Message-----
Hi Chibi,

IIRC a TCP connection speed is dependand of several factors, in generalit's as fast as the bandwith allow, creating more connection will not helpthe speed of the first, al least of course that you have some bandwidthcontrol system in place.

I'm also curious of how you calculate the bandwidth of both theapplications.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Chibi" <an*******@discussions.microsoft.com> wrote in messagenews:07****************************@phx.gbl...
I'm writing an application that's bandwidth intense.

My available bandwidth is 1.5Mbps (cable modem) and I know I can reach around 1.4Mbps, if not more.

The application I am writing right now simply connects to a newsgroup and downloads the headers. It doesn't do any more specific programmming after that. However, the app will
use, at most, 100kbps bandwidth. I'm hoping that it can run much faster than that and reach somewhere close to the 1. 4Mbps maximum.

Is there any way I can use C# to increase this bandwidth
aside from multi-threading and connecting multiple times to the news server? I hope so... I welcome any input.

Thank you.

.

Nov 15 '05 #5
HI Chibi,
My calculation is not very scientific. Basically, I'm
using both applications to download only headers from the
same newsgroup and news server. With the application I've
written, I've calculated 100 headers in about 30 seconds.
With the commercial application, 100 headers download at
about 2-3 seconds.


Are you running your application from the debugger?
If so I will suggest you to compile it to release and run it from the
prompt.
Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Nov 15 '05 #6
Chibi,

10 bucks says that you're using the NNTP HEAD command to retrieve the
headers individually instead of using the NNTP XOVER command (which is what
every other respectable newsgroup software is doing).

If you ever want to find out what commands your news software is using, try
a packet sniffer to monitor your TCP communications.
http://www.prism.gatech.edu/~gte477n/languages/csharp/

Hope this helps,
Jacob
"Chibi" <an*******@discussions.microsoft.com> wrote in message
news:07****************************@phx.gbl...
I'm writing an application that's bandwidth intense.

My available bandwidth is 1.5Mbps (cable modem) and I know
I can reach around 1.4Mbps, if not more.

The application I am writing right now simply connects to a
newsgroup and downloads the headers. It doesn't do any more
specific programmming after that. However, the app will
use, at most, 100kbps bandwidth. I'm hoping that it can run
much faster than that and reach somewhere close to the 1.
4Mbps maximum.

Is there any way I can use C# to increase this bandwidth
aside from multi-threading and connecting multiple times to
the news server? I hope so... I welcome any input.

Thank you.

Nov 15 '05 #7
Also, reuse open connections when possible. TCP takes a bit to get to
the max capacity of the line. If your code makes many connections and
then closes them, the speed won't/can't increase. Agent, my
newswreader, usually keeps a connection to server open for 5 minutes,
allowing efficient retrieval of headers/messages.

Increase the # of headers you download, and you should come close to
maxing out.

Austin
On Mon, 5 Jan 2004 06:16:44 -0800, "Chibi"
<an*******@discussions.microsoft.com> wrote:
Ignacio,

My calculation is not very scientific. Basically, I'm
using both applications to download only headers from the
same newsgroup and news server. With the application I've
written, I've calculated 100 headers in about 30 seconds.
With the commercial application, 100 headers download at
about 2-3 seconds.

Also, it is possible to measure ballpark figures by
calculating number of lines in each header and multiply it
by average number of characters per line.

Obviously, I didn't use a calculator to calculate exact
figures but by the measurements I pointed out above,
there's a huge difference in speed in what I wrote and
what the other application can do. I would like to know
how I can get figures closer to those of the commercial
application.

Any suggestions would be kindly welcomed.

Thank you.

-----Original Message-----
Hi Chibi,

IIRC a TCP connection speed is dependand of several

factors, in general
it's as fast as the bandwith allow, creating more

connection will not help
the speed of the first, al least of course that you have

some bandwidth
control system in place.

I'm also curious of how you calculate the bandwidth of

both the
applications.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Chibi" <an*******@discussions.microsoft.com> wrote in

message
news:07****************************@phx.gbl...
I'm writing an application that's bandwidth intense.

My available bandwidth is 1.5Mbps (cable modem) and Iknow I can reach around 1.4Mbps, if not more.

The application I am writing right now simply connectsto a newsgroup and downloads the headers. It doesn't do anymore specific programmming after that. However, the app will
use, at most, 100kbps bandwidth. I'm hoping that it canrun much faster than that and reach somewhere close to the1. 4Mbps maximum.

Is there any way I can use C# to increase this bandwidth
aside from multi-threading and connecting multipletimes to the news server? I hope so... I welcome any input.

Thank you.

.


Nov 15 '05 #8
Jacob,

Thank you very much for your feedback.

Both of your suggestions have turned out to be very
helpful in my case. If I could send you a $10 bill via
newsgroups, I would. I was using the HEAD command to
retrieve headers. I read an (apparently outdated) RFC on
the NNTP protocol and did not run across the XOVER
command. I'm glad you mentioned it to me.

The NetSniffer also retrieved information that really
helped me understand my problem. It's a very handy utility.

Now, I'm going to go back and study more on the XOVER
command and figure out how to parse the data sent back.

I appreciate your help and from all those others who gave
me information to think about.

Thank you and take care!

-----Original Message-----
Chibi,

10 bucks says that you're using the NNTP HEAD command to retrieve theheaders individually instead of using the NNTP XOVER command (which is whatevery other respectable newsgroup software is doing).

If you ever want to find out what commands your news software is using, trya packet sniffer to monitor your TCP communications.
http://www.prism.gatech.edu/~gte477n/languages/csharp/

Hope this helps,
Jacob
"Chibi" <an*******@discussions.microsoft.com> wrote in messagenews:07****************************@phx.gbl...
I'm writing an application that's bandwidth intense.

My available bandwidth is 1.5Mbps (cable modem) and I know I can reach around 1.4Mbps, if not more.

The application I am writing right now simply connects to a newsgroup and downloads the headers. It doesn't do any more specific programmming after that. However, the app will
use, at most, 100kbps bandwidth. I'm hoping that it can run much faster than that and reach somewhere close to the 1. 4Mbps maximum.

Is there any way I can use C# to increase this bandwidth
aside from multi-threading and connecting multiple times to the news server? I hope so... I welcome any input.

Thank you.

.

Nov 15 '05 #9
At one point I had to find out the same thing. The original NNTP protocol
doesn't include the XOVER command. It's part of the NNTP extensions (RFC
2980). You'll find that virtually every server supports this command, but
it would be wise to still develop a method using the HEAD command just in
case your client's server doesn't. To make the most of the XOVER command,
do some research on the LIST OVERVIEW.FMT command. It will return a list of
all the fields of information that you can expect to receive from the XOVER
command. That what you know what your client's server will be sending and
how to parse it. The XOVER command should return all those fields separated
by tabs, so it should be easy to split the field information on the tabs.

I've been writing a NNTP program for some time, but because of work
restraints, I don't know if I'll ever be able to finish it. But I would be
happy to help you out form time to time with the things I learned along the
way. Keep me apprised of your progress.

ja**********@hotmail.com
Jacob


"Chibi" <an*******@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
Jacob,

Thank you very much for your feedback.

Both of your suggestions have turned out to be very
helpful in my case. If I could send you a $10 bill via
newsgroups, I would. I was using the HEAD command to
retrieve headers. I read an (apparently outdated) RFC on
the NNTP protocol and did not run across the XOVER
command. I'm glad you mentioned it to me.

The NetSniffer also retrieved information that really
helped me understand my problem. It's a very handy utility.

Now, I'm going to go back and study more on the XOVER
command and figure out how to parse the data sent back.

I appreciate your help and from all those others who gave
me information to think about.

Thank you and take care!

-----Original Message-----
Chibi,

10 bucks says that you're using the NNTP HEAD command to

retrieve the
headers individually instead of using the NNTP XOVER

command (which is what
every other respectable newsgroup software is doing).

If you ever want to find out what commands your news

software is using, try
a packet sniffer to monitor your TCP communications.
http://www.prism.gatech.edu/~gte477n/languages/csharp/

Hope this helps,
Jacob
"Chibi" <an*******@discussions.microsoft.com> wrote in

message
news:07****************************@phx.gbl...
I'm writing an application that's bandwidth intense.

My available bandwidth is 1.5Mbps (cable modem) and I know I can reach around 1.4Mbps, if not more.

The application I am writing right now simply connects to a newsgroup and downloads the headers. It doesn't do any more specific programmming after that. However, the app will
use, at most, 100kbps bandwidth. I'm hoping that it can run much faster than that and reach somewhere close to the 1. 4Mbps maximum.

Is there any way I can use C# to increase this bandwidth
aside from multi-threading and connecting multiple times to the news server? I hope so... I welcome any input.

Thank you.

.

Nov 15 '05 #10

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

Similar topics

0
by: Martin Raychev | last post by:
Hi everybody, I have a need for a web app that will allow a flash client to download files at a specified speed. I am using Flash for an application of mine which downloads JPG slides to...
21
by: dub | last post by:
Hello web folks... I've been desigining web pages for 13 years using my trusty text editor (UltraEdit) and in depth knowledge of HTML. I'm truly a text editor ninja at this point. I am frequently...
1
by: Skeleton Man | last post by:
Hi, I have a chat script which I added very basic bandwidth tracking to as follows: ob_start(); print "this is some output!"; print "this is more output!"; $bytes = ob_get_length(); //...
7
by: tgh003 | last post by:
I would be interested to hear how others are managing their javascript (.js) files from the original code vs the obfuscated version they publish to their site/webapp. I currently manage 2 files,...
8
by: Dominic Martin | last post by:
Hi, I need to setup an ODBC link over our Internet connection between MS Access (local) and a MySQL server (Remote - the local PC has the MySQL ODBC driver installed). What kind of bandwidth...
3
by: vadim | last post by:
Hi, Does anybody have an idea on how to reply to a client who's asking about how much bandwidth my app will need. It's asp.net app with SQL Server backend. Is there any general rule of thumb on...
3
by: Jack Fox | last post by:
While stress-testing our ASP.NET app, we discovered a flaw in our test set-up, which also reveals a flaw in our ASP.NET configuration that we do not know how to address. We simulated too...
8
by: FrobinRobin | last post by:
Hi, I intend to use Ajax for a kiosk application, it's primary usage is to retrieve live data from my DB, it's a fairly small amount of data (5 fields, of small data size and limited to 15...
4
by: salman | last post by:
Hello I am developing a server and I want to view and change the the clients TCP connection bandwidth. Please help me Salman Ali
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
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...
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)...

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.