thanks for link, that makes it a lot clearer so I can get to work now... The only part I'm not clear on is this:
4) If all the nonce space is exhausted during calculation or 60 seconds passed since receiving the data, the miner should request new one by means of main connection. 60 seconds limit is set to allow adding new transactions into the block.
Does this mean that the long poll itself should be dropped and reconnected every 60 seconds? Or is it only talking about the main connection.
Also the long poll request is basically identical to a getwork request except for the different URL and lack of timeout?
When the pool terminates the LP connection, it does so to specify that new work is available. What the pool does is sends fresh "getwork" to the miner and drops the connection. The miner then knows that they should stop working on any previous work, and only proceed with the new work. It also re-esthablishes a fresh LP connection to repeat the cycle.
The 60 second thing varies by miner. Many GPU miners, even on cards incapable of iterating the nonce range in 60 seconds, do multiple getworks per minute. All getwork occurs over normal connections, except getwork "pushed" to the mine when it's previous work is invalidated by the network finding a block.