Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: newbie game socket problem
10-31-2012, 12:47 PM #1
- Join Date
- Oct 2012
- Thanked 0 Times in 0 Posts
newbie game socket problem
I'm newbie learning socket programming between windows and linux.
In a simple program I'm developing like a game, the air client from windows sends movement commands for a game object to the linux socket.
1. mouseDown: move
2. mouseUp: stop
Now in practice, if I press and hold mouse, then release it after a while, all works ok. If I just click, then the movement starts and never stops before I either repeat as above, or press the stop button separately.
I need a guarantee that if the gap between press and release of the mouse button is some less than a second, no event handler is triggered. Or, the condition is that handlers must work only if there is a delay>1s between mouseDown and mouseUp.
Is such a thing possible with this solution or a better one please?