/************************************************************
ゲームサーバのステータスを見るサーバ
このサーバは、計算機単位に一個必ず存在する。
GameServerとは接続し続ける。
本来ならば、データベースシステムが行う仕事である。
ゲームサーバとの通信は、PF_UNIXとする。
CGIとの通信は、たの計算機上にCGIが存在するので、
PF_INETとする。これにより、ソケットの種別でパケットの
内容が判断できる。またPF_UNIXにすると、パケットの内容の
損失がPF_INETの場合よりはるかに少ない。
ゲームサーバ状態のメイン処理
(1)8000のポートを開き、CGIよりの接続を待ち、
接続後、CGIに情報を返す
(2)UNIXドメインのポートを開き、ゲームサーバよりの
接続を待ち、ゲームサーバが接続してくれば、
ゲームサーバから送られてくる情報を管理する。
1999年8月80日 SegaSoft (C) 古坂孝史
管理する方法を変更する。
変更個所は、
(1)ゲームサーバから送られてくる情報は、トランザクションにする
(2)CGIから送られてくる情報もトランザクションにする。
(3)CGIから送られてくる情報で、ゲームサーバを起動するコマンドは、
ゲームサーバのタイプを見て判断する。
(4)ゲームサーバの情報は、リストから配列にし、その情報を
ファイルに保存する。一旦Statusサーバを落として、再び
立ち上げても動作するようにする。
-- ここで言うトランザクションの定義 --
TCP を利用した通信で、acceptが完了して一つの
データパケットを受け取り、それを処理すると、その
ソケットを閉じる単位を言う。
1999年9月28日 SegaSoft (C) 古坂孝史
**************************************************************/
***************************************************** ***********
View the status of the game server Server
There is always one server for each computer.
Stay connected to the Game Server.
Originally, it is the work done by the database system.
Communication with the game server is PF_UNIX.
Communication with CGI is because CGI exists on the computer.
Let's say PF_INET. This allows for packet types by socket type
The content can be judged. Also, if PF_UNIX is set, the contents of the packet
The loss is much less than with PF_INET.
Main processing of game server state
(1) Open 8000 ports, wait for connection from CGI,
After connecting, return information to CGI
(2) Open the UNIX domain port and from the game server
Wait for the connection, and if the game server connects,
Manage the information sent from the game server.
August 80, 1999 SegaSoft (C) Takashi Kosaka
Change the management method.
The changed part is
(1) Make the information sent from the game server a transaction
(2) The information sent from CGI is also made into a transaction.
(3) The command to start the game server with the information sent from CGI is
Judge by looking at the type of game server.
(4) The game server information is arranged from the list and the information is displayed.
Save to a file. Shut down the Status server and then again
Make it work even if it is started up.
--Definition of transaction mentioned here--
In communication using TCP, accept is completed and one
When you receive a data packet and process it,
A unit that closes a socket.
September 28, 1999 SegaSoft (C) Takashi Kosaka
****************************************************** ************ /