Net_Socket::connect()

Net_Socket::connect() -- connects to a server

Synopsis

require_once 'Net/Socket.php';

boolean Net_Socket::connect (string $addr, integer $port, boolean [$persistent = NULL], integer [$timeout = NULL])

Описание

Connect to the specified port. If called when the socket is already connected, it disconnects and connects again.

Возвращаемое значение

boolean - Возвращает TRUE при удаче и PEAR_Error в обратном случае.

Throws

Таблица 49-1. Возможные значения PEAR_Error

Error codeError messageReasonSolution
everyevery The connection could not be established because

  • wrong server name or adress

  • the host itself is not link to a network

  • a firewall does not allow an access

Check for server name, the connection to the net and possible firewalls on client or server side

Заметка

Эта функция не должна вызываться статически.

См. также

Net_Socket::disconnect()


HIVE: All information for read only. Please respect copyright!
Hosted by hive йца: йХЕБЯЙЮЪ ЦНПНДЯЙЮЪ АХАКХНРЕЙЮ