X-Git-Url: http://git.sourceforge.jp/view?p=shogi-server%2Fshogi-server.git;a=blobdiff_plain;f=shogi-server;h=c4573c658d08dc813bc5a0e370229e7e6893cd47;hp=580760a34f2f9a4e69754ee27d8bb4e9b20b9271;hb=48967e86b1a0ca5ed7c67b882757b9acd2a58655;hpb=3f009a5ec519ab0cb5f27de8aca96d1ad2e88ed6 diff --git a/shogi-server b/shogi-server index 580760a..c4573c6 100755 --- a/shogi-server +++ b/shogi-server @@ -62,35 +62,92 @@ end def usage print <.conf". The file will be re-read once just after a + game starts. + + For example, a floodgate-3600-30 game group requires + floodgate-3600-30.conf. However, for floodgate-900-0 and + floodgate-3600-0, which were default enabled in previous + versions, configuration files are optional if you are happy with + default time settings. + File format is: + Line format: + # This is a comment line + DoW Time + ... + where + DoW := "Sun" | "Mon" | "Tue" | "Wed" | "Thu" | "Fri" | "Sat" | + "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | + "Friday" | "Saturday" + Time := HH:MM + + For example, + Sat 13:00 + Sat 22:00 + Sun 13:00 + LICENSE - GPL versoin 2 or later + GPL versoin 2 or later SEE ALSO RELEASE - #{ShogiServer::Release} + #{ShogiServer::Release} REVISION - #{ShogiServer::Revision} + #{ShogiServer::Revision} EOM end @@ -358,6 +415,7 @@ def main log_message("server started [Revision: #{ShogiServer::Revision}]") server.start do |client| + begin # client.sync = true # this is already set in WEBrick client.setsockopt(Socket::SOL_SOCKET, Socket::SO_KEEPALIVE, true) # Keepalive time can be set by /proc/sys/net/ipv4/tcp_keepalive_time @@ -379,6 +437,9 @@ def main ensure $mutex.unlock end + rescue Exception => ex + log_error("server.start: #{ex.class}: #{ex.message}\n\t#{ex.backtrace[0]}") + end end end