Go to file
hant 52e465177c Fix event loop initialization and handle pipe errors
- Modified startup script to instantiate GameProcessServer separately
  before wrapping in WsServer/HttpServer, allowing direct access to
  set event loop after IoServer creation
- Implemented setLoop() method to set event loop after construction
- Added error handling for fwrite() to gracefully handle broken pipes
  when process closes
- Suppressed fread() warnings with @ operator to avoid noise
- Simplified startOutputReader() since event loop polling is now
  handled directly in onOpen()
- Added null checks for event loop before using in timers
- Server now properly starts with continuous 100ms output polling

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 14:17:28 +08:00
.idea Fix web state management: handleInput now returns structured data 2025-12-07 13:14:48 +08:00
bin 法术 2025-12-02 23:13:38 +08:00
src Fix event loop initialization and handle pipe errors 2025-12-07 14:17:28 +08:00
test Implement Server-Sent Events (SSE) for real-time battle streaming 2025-12-07 10:50:30 +08:00
web Fix line breaks in process output handling 2025-12-07 13:35:36 +08:00
.DS_Store first 2025-12-05 09:38:15 +08:00
.gitignore 技能优化 2025-12-05 17:38:10 +08:00
box.json first 2025-12-01 18:13:15 +08:00
build-phar.php first 2025-12-01 18:13:15 +08:00
build.sh first 2025-12-01 18:13:15 +08:00
composer.json Implement WebSocket real-time communication for game 2025-12-07 12:21:30 +08:00
composer.lock Implement WebSocket real-time communication for game 2025-12-07 12:21:30 +08:00
save.json Fix event loop initialization and handle pipe errors 2025-12-07 14:17:28 +08:00
start-server.sh first 2025-12-01 18:13:15 +08:00
test-websocket.php Fix event loop initialization and handle pipe errors 2025-12-07 14:17:28 +08:00
websocket-process-server.php Fix event loop initialization and handle pipe errors 2025-12-07 14:17:28 +08:00
websocket-server.php Implement WebSocket real-time communication for game 2025-12-07 12:21:30 +08:00