PHP-Fusion
v.7.01
AP-Fusion
v7.02.05
Pimped-Fusion-AP
v0.09.03
March 28 2024 20:50:39
Авторизация
Логин

Пароль



Вы не зарегистрированы?
Нажмите здесь для регистрации.

Забыли пароль?
Запросите новый здесь.
Мини-чат
Вы должны авторизироваться, чтобы добавить сообщение.

lom
06/04/2018 14:03
Мы рады, ждем девятку. Очень хочется пощупать

Alipapa
27/03/2018 22:16
Всем привет, все неисправности устранили, всё у нас работает

mukaton
30/10/2015 02:37
Не получается ничего скачать. Ошибка Not Found

Alipapa
06/10/2015 23:00
9-я версия php-fusion на подходе, следите за новостями

Alipapa
10/11/2014 11:24
Заметь, я дважды ответил через 3 минуты после вопроса, могли бы уже решить

Последние статьи
· О стабилизаторах нап...
· СМС и Вебмани
· TinyMCE для пользова...
· PCRE (Perl Compatibl...
· PCRE (Perl Compatibl...
Последние активные темы форума
  Темы Просмотров Ответов Последние сообщения
PHP-Fusion 7 Bogatyr - бесп...
Моды, плагины
7103 1 Vveb--ws
08-10-2018 16:47
Php-Fusion v9. Первые впеча...
Вопросы по работе
4471 3 Vveb--ws
25-07-2018 13:46
Появился хэлп по PHP-Fusion...
Вопросы по работе
6710 7 Vveb--ws
25-07-2018 13:42
prestashop&ap-fusion
Вопросы по работе
17302 61 Alipapa
26-08-2014 10:29
Плагин магазина Ap-Shop
Моды, плагины
14529 70 Alipapa
18-08-2014 18:14
TinyMCE
Вопросы по работе
21052 55 Alipapa
27-07-2013 21:57
HTML-5
Моды, плагины
5415 1 Alipapa
15-06-2013 19:47
Мультиязычность в Pimped-Fu...
Ошибки, баги, глюки
6243 4 Papich
16-04-2013 12:39
Pimped-Fusion. Первые впеча...
Ошибки, баги, глюки
21613 127 Alipapa
18-12-2012 10:59
Ищу мод для расстановки код...
Моды, плагины
14965 55 Alipapa
17-09-2012 14:00
Как присоединить файл к лич...
Моды, плагины
8246 3 lom
27-05-2012 18:12
Что мне не нравится в после...
Вопросы по работе
6835 4 Alipapa
27-05-2012 18:08
Проблемы с добавлением кате...
Вопросы по работе
7715 5 Alipapa
27-05-2012 18:06

msg_receive

(PHP 4 >= 4.3.0, PHP 5)

msg_receive --  Receive a message from a message queue

Description

bool msg_receive ( resource queue, int desiredmsgtype, int &msgtype, int maxsize, mixed &message [, bool unserialize [, int flags [, int &errorcode]]] )

msg_receive() will receive the first message from the specified queue of the type specified by desiredmsgtype. The type of the message that was received will be stored in msgtype. The maximum size of message to be accepted is specified by the maxsize; if the message in the queue is larger than this size the function will fail (unless you set flags as described below). The received message will be stored in message, unless there were errors receiving the message, in which case the optional errorcode will be set to the value of the system errno variable to help you identify the cause.

If desiredmsgtype is 0, the message from the front of the queue is returned. If desiredmsgtype is greater than 0, then the first message of that type is returned. If desiredmsgtype is less than 0, the first message on the queue with the lowest type less than or equal to the absolute value of desiredmsgtype will be read. If no messages match the criteria, your script will wait until a suitable message arrives on the queue. You can prevent the script from blocking by specifying MSG_IPC_NOWAIT in the flags parameter.

unserialize defaults to TRUE; if it is set to TRUE, the message is treated as though it was serialized using the same mechanism as the session module. The message will be unserialized and then returned to your script. This allows you to easily receive arrays or complex object structures from other PHP scripts, or if you are using the WDDX serializer, from any WDDX compatible source. If unserialize is FALSE, the message will be returned as a binary-safe string.

The optional flags allows you to pass flags to the low-level msgrcv system call. It defaults to 0, but you may specify one or more of the following values (by adding or ORing them together).

Таблица 1. Flag values for msg_receive

MSG_IPC_NOWAITIf there are no messages of the desiredmsgtype, return immediately and do not wait. The function will fail and return an integer value corresponding to ENOMSG.
MSG_EXCEPTUsing this flag in combination with a desiredmsgtype greater than 0 will cause the function to receive the first message that is not equal to desiredmsgtype.
MSG_NOERRORIf the message is longer than maxsize, setting this flag will truncate the message to maxsize and will not signal an error.

Upon successful completion the message queue data structure is updated as follows: msg_lrpid is set to the process-ID of the calling process, msg_qnum is decremented by 1 and msg_rtime is set to the current time.

msg_receive() returns TRUE on success or FALSE on failure. If the function fails, the optional errorcode will be set to the value of the system errno variable.

Смотрите также msg_remove_queue(), msg_send(), msg_stat_queue() and msg_set_queue().

Все функции PHP:
Навигация
· Новости
· Статьи
· Скачать
· Форум
· Ссылки
· Категории новостей
· Обратная связь
· Галерея
· Поиск
· CMS AP-Fusion. Отличия от PHP-Fusion
· Javascript справочник
· Техника
Сейчас на сайте
· Гостей: 3

· Пользователей: 0

· Всего пользователей: 453
· Новый пользователь: ZDA
Информеры
Загрузка файлов  +  -
9,910,435 уникальных посетителей Iceberg by Harly