Jump to content

  • Log In with Google      Sign In   
  • Create Account


Idov

Member Since 30 Nov 2006
Offline Last Active Sep 28 2013 06:58 AM

#5063067 Making a "Busy Loop" not consume that much CPU (without Sleep)

Posted by Idov on 19 May 2013 - 02:32 PM

Hi,
I tried using Waitable Timers like in this example:
http://msdn.microsoft.com/en-us/library/ms687008.aspx

But it seems that the event is signaled only after 1 milisecond and after not the time I specified...
I tried using:
   double timeoutMicro = 400;
    liDueTime.QuadPart =  -1 * timeoutMicro * 10;
 




#4980069 Overusing interfaces?

Posted by Idov on 14 September 2012 - 08:32 AM

There isn't such a thing as "overusing interfaces"!!! Posted Image


#4980063 License server and open ports

Posted by Idov on 14 September 2012 - 08:15 AM

Hi!
Suppose that I have a license server that goes with my program.
The client installs both of them on his computers so when he tries to use a floating license, I can tell whether or not it is already in use.

The license server listens on a UDP port and the clients use it to communicate with the server and receive a TCP port number to which they should
connect in order to continue their conversation with the server.

Since the server is also installed at the clients, I cannot know which other processes run on the same computer while my server does and they might use the same UDP port. If they use the same UDP port, I'd either be blocked from using it or I'd have to share the port with the other process, losing messages since they go to the other process instead of going to my server.

How can I avoid this?
Should I use a configurable UDP port? The problem is that if I do it, the client will be able to run several license servers, each on a different port, unaware of each other while the clients will be able to use the same license on different instances of the server... I'll miss the whole point...

What should I do?
thanks Posted Image


PARTNERS