Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventListener callback #5

Closed
korolev-d-l opened this issue Oct 1, 2014 · 2 comments
Closed

EventListener callback #5

korolev-d-l opened this issue Oct 1, 2014 · 2 comments

Comments

@korolev-d-l
Copy link

В этом методе https://github.com/morozovsk/websocket/blob/master/WebsocketGenericEvent.php#L51 , вы параметр $connection обрабатываете с помощью $this->getIdByConnection($connection);
Вопрос : В каких случаях $connection не int ?

Мой дамп при конекте:

var_dump([$listener, $connection, $address, $id]);

array(4) {
  [0]=>
  object(EventListener)#5 (1) {
    ["fd"]=> int(3)
  }
  [1]=> int(7)
  [2]=>
  array(2) {
    [0]=> string(9) "127.0.0.1"
    [1]=> int(60314)
  }
  [3]=>
  object(EventBase)#4 (0) {
  }
}
@morozovsk
Copy link
Owner

Здравствуйте. К сожалению я не смог найти вменяемой документации по pecl/event, по этому приходилось писать код по примерам. Сейчас у меня нет возможности протестировать в каких случаях $connection не int, по-тому что я использую pecl/libevent (у него нормальная документация), а он почему то с недавних пор начал конфликтовать с pecl/event.

@morozovsk
Copy link
Owner

проверил, операция была лишняя, ни на что не влияла, но всё равно поправил

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants