0

I'm working on an app project where I need to verify if a client/user did something within a specific timespan (e.g. responded within 10 seconds). The problem is that - as it is an app - the client could have a very slow connection or even a disconnect within that time so I wouldn't like to check it with server side timestamps when the request comes in.

Is there a way to check if a client did something within a specific timespan?

I don't need a specific language implementation, I'll find one or port one if required.

(PS: Tags are quite hard to chose for this question, I hope I got some correct ones)

Sebb
  • 871
  • 6
  • 16

1 Answers1

0

Have you checked out TimeSeal?

FICS (Free Internet Chess Server) uses it for latency compensation in online chess games.

It's closed source so people don't cheat heh heh, but there is OpenSeal, which is open source: http://linuz.sns.it/~m2/openseal.c

You would need to change the parameters to fit your server as it points to FICS.

This does what I think you're looking to do though. It's in C, I'm not sure how you feel about that.

PyChess also has an open source timeseal. Here is the code in Python: http://code.google.com/p/pychess/source/browse/lib/pychess/ic/TimeSeal.py?spec=svn6aae01bf2fdf49316e38319c93a200d67d5265fa&r=6aae01bf2fdf49316e38319c93a200d67d5265fa

I feel like OpenSeal s a bit easier to swallow though.

Fdisk
  • 51
  • 1
  • 3
  • Thanks, that what I was searching for. Will have to port it though, but that'll make my github page look nicer ;) Thank you – Sebb Jun 11 '14 at 20:50