Overview

Packages

  • None
  • thrift
    • transport

Classes

  • TBufferedTransport
  • TFramedTransport
  • THttpClient
  • TMemoryBuffer
  • TNullTransport
  • TPhpStream
  • TSocket
  • TSocketPool
  • TTransport
  • Overview
  • Package
  • Class
  • Tree

Class THttpClient

HTTP client for Thrift

TTransport
Extended by THttpClient
Package: thrift\transport
Author: Mark Slee mcslee@facebook.com
Located at Horde/Thrift/thrift_root/transport/THttpClient.php
Methods summary
public
# __construct( string $host, integer $port = 80, string $uri = '', mixed $scheme = 'http' )

Make a new HTTP client.

Make a new HTTP client.

Parameters

$host
$port
$uri
$scheme
public
# setTimeoutSecs( float $timeout )

Set read timeout

Set read timeout

Parameters

$timeout
public boolean
# isOpen( )

Whether this transport is open.

Whether this transport is open.

Returns

boolean
true if open
public
# open( )

Open the transport for reading/writing

Open the transport for reading/writing

Throws

TTransportException
if cannot open
public
# close( )

Close the transport.

Close the transport.

public string
# read( integer $len )

Read some data into the array.

Read some data into the array.

Parameters

$len
How much to read

Returns

string
The data that has been read

Throws

TTransportException
if cannot read any more data
public
# write( string $buf )

Writes some data into the pending buffer

Writes some data into the pending buffer

Parameters

$buf
The data to write

Throws

TTransportException
if writing fails
public
# flush( )

Opens and sends the actual request over the HTTP connection

Opens and sends the actual request over the HTTP connection

Throws

TTransportException
if a writing error occurs

Overrides

TTransport::flush()
Methods inherited from TTransport
readAll()
API documentation generated by ApiGen