Commit Graph
9 Commits
Author SHA1 Message Date
Peter S. May 79ee8c1c81 Block+timeout CanRead/CanWrite/DataAvailable EzSockets methods.
A minor change to the code exposes the timeout parameter of `select()`, which was already in use for CanRead()/CanWrite(). The timeout parameter is used to block the current thread until data (for read) or space (for write) is available on the underlying socket.

A timeout of 0 suppresses any blocking (the original methods fix the timeout to 0).

The timeout value is supplied in milliseconds as an `unsigned int`; this is converted internally to the equivalent `timeval`.

An in-progress addition to my SextetStream input driver is implemented with non-blocking reads on a TCP socket. Without the block+timeout functionality, it must busy-wait for new input. Changing the reads to blocking works during a game but can cause the program to hang when exiting. The changes in this commit provide a solution to both issues without disrupting any existing code.
2015-04-23 12:50:28 -04:00
psmay 55d58659c4 Merge pull request #3 from stepmania/master
Update master
2015-04-21 09:37:14 -04:00
Peter S. May 737154ff00 Merge branch 'SextetStream-lights-and-input' of github.com:psmay/stepmania 2014-11-24 13:34:26 -05:00
Peter S. May 744593e707 Merge branch 'master' of https://github.com/stepmania/stepmania 2014-11-24 13:31:23 -05:00
psmay 1f8205b5d7 en.ini: Fix "guage" 2014-11-06 16:55:51 -05:00
Peter S. May a991ae18a0 SextetStream input and lights drivers. 2014-10-19 16:51:54 -04:00
Peter S. May 1f81c64c00 Merge remote-tracking branch 'upstream/master' 2014-10-19 15:49:36 -04:00
Peter S. May 5fa0c9dda6 Merge branch 'master' of github.com:psmay/stepmania 2014-10-13 08:45:23 -04:00
psmay 71d3a07d93 Merge pull request #1 from stepmania/master
Make the log mention Windows 8 instead of "unknown NT-based"
2014-10-07 08:52:33 -04:00