Kerio APIs Client Library for PHP 1.4.0.234
  • Namespace
  • Class
  • Tree
  • Deprecated

Namespaces

  • None
  • PHP

Classes

  • KerioApi
  • KerioApiSocket
  • KerioConnectApi
  • KerioControlApi
  • KerioDirectoryApi
  • KerioOperatorApi
  • KerioWorkspaceApi
  • SamepageApi

Interfaces

  • KerioApiInterface
  • KerioApiSocketInterface

Exceptions

  • KerioApiException

Class KerioApiSocket

Kerio API Socket Class.

This class implements basic methods used in HTTP communication.

KerioApiSocket implements KerioApiSocketInterface
Copyright: Copyright © 2012-2012 Kerio Technologies s.r.o.
License: http://www.kerio.com/developers/license/sdk-agreement
Version: 1.4.0.234
Located at class/KerioApiSocket.php

Methods summary

public boolean
# KerioApiSocket( string $hostname, integer $port, integer $timeout = '' )

Class constructor.

Class constructor.

Parameters

$hostname
string
Hostname
$port
integer
Port
$timeout
integer
Timeout, optional

Returns

boolean
True on success
public
# __destruct( )

Class desctructor.

Class desctructor.

protected
# open( )

Open socket to server.

Open socket to server.

protected
# close( )

Close socket to server.

Close socket to server.

public string
# send( string $data )

Send data to socket.

Send data to socket.

Parameters

$data
string
Data to socket

Returns

string
Data from socket

Throws

KerioApiException

See

class/KerioApiSocketInterface::send()

Implementation of

KerioApiSocketInterface::send()
protected string
# read( )

Read data from socket.

Read data from socket.

Returns

string
HTTP data from socket

Throws

KerioApiExceptions
public
# setEncryption( boolen $boolean )

Set connection encryption to ssl://

Set connection encryption to ssl://

Parameters

$boolean
boolen
True if ssl:// is used
final public boolean
# checkConnection( )

Check connection to server.

Check connection to server.

Returns

boolean
True on success
final public boolean
# checkHost( )

Check if DNS host is valid.

Check if DNS host is valid.

Returns

boolean
True on success
final public string
# getHeaders( )

Get headers.

Get headers.

Returns

string
final public string
# getBody( )

Get body.

Get body.

Returns

string
final public string
# getErrorMessage( )

Get socker error message.

Get socker error message.

Returns

string
final public integer
# getErrorCode( )

Get socket error code.

Get socket error code.

Returns

integer

Magic methods summary

Constants summary

integer BUFFER_SIZE 10240
#

Socket buffer size

Socket buffer size

Kerio APIs Client Library for PHP 1.4.0.234 API documentation generated by ApiGen 2.8.0