如何使用C ++访问HHVM进程中的php会话数据?

Here is some background info:

  • I have a dynamic loaded extension running on HHVM using FastCGI
  • I have a login'ed session ready. e.g. example.com/login.php
  • I have my own TCP server running within the HHVM fastCGI process, listening port e.g. 8080. (Assuming the TCP server is started when the extension is loaded, and wait for web socket connections)

What I want to do is, to re-use the session started by login.php in my own TCP server that serves web socket connections. The client should already give me the PHPSESSID cookie from the HTTP header, all I think I need to do is to use that ID to lookup somewhere in the HHVM runtime (because we're in the same process), checking if that session exist or something like that. So I can safely stream data to that websocket.

Is there an API I can call to do that?

Is there any example I can follow? Can someone help me please?

Thank you,