473,766 Members | 2,044 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5946
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.co m

"Chibi" <an*******@disc ussions.microso ft.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.co m

"Chibi" <an*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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.mach in AT dot.state.fl.us
Florida Department Of Transportation

"Chibi" <an*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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
application s.

Cheers,

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

"Chibi" <an*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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**********@ho tmail.com
Jacob


"Chibi" <an*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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
1395
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 users' web based app. Because I can't control how quickly a file (in this case, a JPG slide) is
21
4840
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 using regular expressions to search and replace in multiple files. I also use many different copy buffers and know all the keyboard shortcuts like the back of my hand. The point is... it's comfortable. Unfortunately, it's become just too...
1
2296
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(); // Amount of bandwidth used ob_end_flush();
7
3617
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, and everytime i need to make a change, I have to switch the names, test, then rename again, obfuscate to the original file name (because this is the file referenced in php/perl/asp whatever files). So its kind of a pain. Any thoughts out...
8
3551
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 requirements am I looking at? Will it function over a 64k leased line? If this would be slow, could there be any major impact on other uses such as web and email? Regards,
3
2378
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 how to do this? Without going to packet size and so on. Thank you Vadim
3
1860
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 many clients, making requests faster than the bandwidth on that part of the network could consume the responses. It seems that the inability of the requestors to receive their responses causes IIS, and/or aspnet_wp.exe, to eventually max-out its...
8
6035
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 rows). When I check my server logs I can see that the kiosk page has used a fair amount of bandwidth this month, this is obviously because a javascript timeout refreshes the data every 10 seconds. What I need to know is how to calculate the...
4
2552
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
9568
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
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
10168
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...
1
9959
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9837
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
6651
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();...
1
3929
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.