Re: LSP & Bandwidth Limiting

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Great!
Arkady

"Khan" <khan@xxxxxxxxxx> wrote in message
news:OcyeczH8GHA.4552@xxxxxxxxxxxxxxxxxxxxxxx
Arkady,

WSAWOULDBLOCK works fine other doesn't. Thanks so much for your help. I
really appriciate your help. I returned -1 as result and WSAWOULDBLOCK as
Errorcode. It works fine now.

Thanks so much one more time...


"Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx> wrote in message
news:OjlgtZG8GHA.3264@xxxxxxxxxxxxxxxxxxxxxxx
Try WSA_IO_PENDING or WSAWOULDBLOCK errors ( really not errors but
warnings ) depending of socket type
Arkady

"Khan" <khan@xxxxxxxxxx> wrote in message
news:OjdkQ6F8GHA.4604@xxxxxxxxxxxxxxxxxxxxxxx
When I return "0" the website showing is mess. Do I have to return any
other paramters? Or just return 0? I tried to return -1 and i must find
an error code to give it back :)

"Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx> wrote in message
news:euBaLlC8GHA.2092@xxxxxxxxxxxxxxxxxxxxxxx
You have to postpond ( not sleep ) just say that OK back but not to
proccess the request when limit reached and do it when you see that it
possible. Windows do the same when you call WSASend() , the return code
mean that returned number of bytes moved to driver for processing
Arkady


"Khan" <khan@xxxxxxxxxx> wrote in message
news:OsGdpT87GHA.3812@xxxxxxxxxxxxxxxxxxxxxxx
Arkady,

I have tried to put a sleep. When I write my own application it is
easy to handle it. I can put a sleep inside a thread. I have tried it
and it seems that it works just fine. However when I put a sleep
inside LSP IE download window hangs because it uses internal sleep().
So I think I must find a way to make it inside the thread or something
else. I couldn't find what todo. sleep() function hangs the window of
downloader software. Whatever it is it will just hang.

What must I do for this?


"Khan" <khan@xxxxxxxxxx> wrote in message
news:uIqLCo67GHA.4572@xxxxxxxxxxxxxxxxxxxxxxx
I think i couldn't explain... I want to limit bandwidth like 2 K/sec
if they even have 10 mbps connection. If they reach bandwidth I can
stop the internet usage no problem. But I want to limit the usage that
time.

Let's say I am using my limiter and downloading a software from
internet. I have 2 mbps connection so I am downloading it like
220K/sec. When I enable the limiter it will only download 5K/sec for
selected application or all applications will only download total
5K/sec. I can get the application name no problem to set it. However
limiting is complex. I couldn't find a way for about 3 years. :) I am
working on LSP about 3-4 years by now and maybe you can help me todo
that.

Thanks a lot...


"Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx> wrote in message
news:eDQZXK67GHA.4116@xxxxxxxxxxxxxxxxxxxxxxx
Hi, Khan!
Error code you return for new session if system throughput exceed
the limit, for current sessions you need to postpond the send or
receive due to current process throughput due to configuration's
settings. You need to put aside data and not move it up or down when
limit reached, and continue with it when possible. That what
www.netlimiter.com do , but sure that that not little example but
complex s/w
Arkady


"Khan" <khan@xxxxxxxxxx> wrote in message
news:eoD2%23v37GHA.244@xxxxxxxxxxxxxxxxxxxxxxx
Arkady,

I am sorry i was not using my pc for a while. Thanks so much for
your help but i don't understand something. If I return an error
code so main application may close connection. How will i see and
stop responding on WSPReceive and WSPSend ?

Could you please give me a little example? I couldn't find one on
internet...


"Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx> wrote in message
news:Or9WwGH7GHA.1492@xxxxxxxxxxxxxxxxxxxxxxx
Sure not inside the session, just before you start if you see that
enough data passing , you stop oncomming connection, for existing
session you can do it postponding the data ( sleep -that direct
variant of that )
Arkady

"Khan" <khan@xxxxxxxxxx> wrote in message
news:uFwXHYF7GHA.4500@xxxxxxxxxxxxxxxxxxxxxxx
I can return error if i am doing a content management or
connection management. I want to ask how to limit bandwidth.
returning error will close the sockets or break the connection and
will cause data loss

"Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx> wrote in message
news:ObPD7XE7GHA.3732@xxxxxxxxxxxxxxxxxxxxxxx
You can return error to those you don't want to pass just at the
moment
Arkady

"Khan" <khan@xxxxxxxxxx> wrote in message
news:OsL81i$6GHA.4644@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

I have written my own LSP and I want to add bandwidth
limitation like www.netlimiter.com does. I couldn't find a way
todo that. Sleep() doesn't work well afaik. Are there any good
suggestions for this?

























.



Relevant Pages

  • Re: LSP & Bandwidth Limiting
    ... I can put a sleep inside a thread. ... download window hangs because it uses internal sleep. ... I have 2 mbps connection so I am downloading it like ... Error code you return for new session if system throughput exceed the ...
    (microsoft.public.win32.programmer.networks)
  • Re: LSP & Bandwidth Limiting
    ... I can put a sleep inside a thread. ... I have 2 mbps connection so I am downloading it like 220K/sec. ... When I enable the limiter it will only download 5K/sec for selected ... Error code you return for new session if system throughput exceed the ...
    (microsoft.public.win32.programmer.networks)
  • Re: LSP & Bandwidth Limiting
    ... I can put a sleep inside a thread. ... download window hangs because it uses internal sleep. ... I have 2 mbps connection so I am downloading it like ... Error code you return for new session if system throughput exceed the ...
    (microsoft.public.win32.programmer.networks)
  • Re: LSP & Bandwidth Limiting
    ... I can put a sleep inside a thread. ... However when I put a sleep inside LSP IE download ... I have 2 mbps connection so I am downloading it like 220K/sec. ... Error code you return for new session if system throughput exceed the ...
    (microsoft.public.win32.programmer.networks)
  • Re: LSP & Bandwidth Limiting
    ... If I return an error code so main ... application may close connection. ... do it postponding the data (sleep -that direct variant of that) ... I want to ask how to limit bandwidth. ...
    (microsoft.public.win32.programmer.networks)