Antony Dovgal pisze:
On 02.06.2008 20:49, Adam Klobukowski wrote:
HYAMIAGENT agent;

PHP_MINIT_FUNCTION(gra)
{
     yamiNetInitialize();

     yamiCreateAgent(&agent, 0, NULL);

yamiAgentDomainRegister(agent, SERVER_NAME, SERVER_ADDRES, SERVER_PORT, 2);

     return SUCCESS;
}
/* }}} */

Well, this is clearly wrong as the agent object has to be created by your functions each time - in the same way as MySQL are created each time you
connect to a MySQL server.

Thats is not true. Agent is multi threaded internally and required once per instance. For example, in server, one agent is responsible for all communication for multiple objects (services).

But I guess the NetInitialize() function might be called once per process.

That's true.

Also you didn't mention whether you're developing on Windows or not - there seem to be quite a noticeable difference in the way that library works.

I'm developing for Linux.

Adam Klobukowski

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to