Overview

Packages

  • Horde
    • Imsp

Classes

  • Horde_Imsp_Auth_Base
  • Horde_Imsp_Auth_CramMd5
  • Horde_Imsp_Auth_Imtest
  • Horde_Imsp_Auth_Plaintext
  • Horde_Imsp_Book
  • Horde_Imsp_Client_Base
  • Horde_Imsp_Client_Socket
  • Horde_Imsp_Exception
  • Horde_Imsp_Options
  • Horde_Imsp_Translation
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Imsp_Client_Socket

The Horde_Imsp_Client base class.

Copyright 2003-2012 Horde LLC (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Horde_Imsp_Client_Base
Extended by Horde_Imsp_Client_Socket
Package: Horde\Imsp
Author: Michael Rubinsky mrubinsk@horde.org
Located at Horde/Imsp/Client/Socket.php
Methods summary
public
# __construct( array $params )

Constructor function. Required parameters:

authObj  <Horde_Imsp_Auth>  The object to handle the authentication

Constructor function. Required parameters:

authObj  <Horde_Imsp_Auth>  The object to handle the authentication

Optional parameters:

server   <string>           The IMSP host
 port     <string>           The port the IMSP server listens on
 logger  <Horde_Log_Logger>  The logger.

Parameters

$params
Hash containing server parameters.

Overrides

Horde_Imsp_Client_Base::__construct()
public boolean
# authenticate( boolean $login = true )

Attempts to login to IMSP server.

Attempts to login to IMSP server.

Parameters

$login
Should we remain logged in after auth?

Returns

boolean
public
# logout( )

Logs out of the server and closes the IMSP stream

Logs out of the server and closes the IMSP stream

public string
# capability( )

Returns the raw capability response from the server.

Returns the raw capability response from the server.

Returns

string
The raw capability response.

Throws

Horde_Imsp_Exception
public
# send( string $commandText, boolean $includeTag = true, boolean $sendCRLF = true, boolean $continuation = false )

Attempts to send a command to the server.

Attempts to send a command to the server.

Parameters

$commandText
Text to send to the server.
$includeTag
Determines if command tag is prepended.
$sendCRLF
Determines if CRLF is appended.
$continuation
Expect a command continuation response.

Throws

Horde_Imsp_Exception
public mixed
# receive( )

Receives a single CRLF terminated server response string

Receives a single CRLF terminated server response string

Returns

mixed
'NO', 'BAD', 'OK', raw response.

Throws

Horde_Imsp_Exception
public array
# getServerResponseChunks( )

Retrieves CRLF terminated response from server and splits it into an array delimited by a .

Retrieves CRLF terminated response from server and splits it into an array delimited by a .

Returns

array
The exploded string
public string
# receiveStringLiteral( integer $length )

Receives fixed number of bytes from IMSP socket. Used when server returns a string literal.

Receives fixed number of bytes from IMSP socket. Used when server returns a string literal.

Parameters

$length
Number of bytes to read from socket.

Returns

string
Text of string literal.
Methods inherited from Horde_Imsp_Client_Base
quoteSpacedString()
Constants inherited from Horde_Imsp_Client_Base
MUST_QUOTE, MUST_USE_LITERAL, OCTET_COUNT
Properties inherited from Horde_Imsp_Client_Base
$_logger, $host, $lastRawError, $port
API documentation generated by ApiGen