I would like to sleep for packetSize/Bandwidth amount of duration for a network application in VB.
This value varies from "10^-3 - 10^-6" seconds.
When I use the Sleep() func, I think it is not sleeping for the duration if it is less than unity (< 1 sec ~~ 0 sec??).
Edited:
- I have to keep sending packets after a short nap of above range. So, I could not specify, for eg., to sleep for 0.001 milliseconds at the client side.
- My requirement is for the client side of CS app, which reads a file and keeps sending small packets at regular or irregular interval of sleeps to the Server. The Server, later, captures the packets and processes it at its own rate.
How to achieve this?