Net_DNS2
[ class tree: Net_DNS2 ] [ index: Net_DNS2 ] [ all elements ]

Class: Net_DNS2_Socket_Streams

Source Location: /Net_DNS2-1.4.1/Net/DNS2/Socket/Streams.php

Class Overview

Net_DNS2_Socket
   |
   --Net_DNS2_Socket_Streams

Socket handling class using the PHP Streams


Author(s):

Methods


Inherited Variables

Inherited Methods

Class: Net_DNS2_Socket

Net_DNS2_Socket::__construct()
constructor - set the port details
Net_DNS2_Socket::bindAddress()
sets the local address/port for the socket to bind to
Net_DNS2_Socket::close()
closes a socket connection to the DNS server
Net_DNS2_Socket::open()
opens a socket connection to the DNS server
Net_DNS2_Socket::read()
reads a response from a DNS server
Net_DNS2_Socket::write()
writes the given string to the DNS server socket
Net_DNS2_Socket::__destruct()
destructor

Class Details

[line 67]
Socket handling class using the PHP Streams

The sockets extension is faster than the stream functions in PHP, but it's not standard. So if the extension is loaded, then the Net_DNS2_Socket_Sockets class it used, otherwise, this class it used.



[ Top ]


Method Detail

close   [line 184]

boolean close( )

closes a socket connection to the DNS server
  • Access: public

Overrides Net_DNS2_Socket::close() (closes a socket connection to the DNS server)
[ Top ]

open   [line 78]

boolean open( )

opens a socket connection to the DNS server
  • Access: public

Overrides Net_DNS2_Socket::open() (opens a socket connection to the DNS server)
[ Top ]

read   [line 267]

mixed read( integer &$size, $max_size)

reads a response from a DNS server
  • Return: returns the data on success and false on error
  • Access: public

Overrides Net_DNS2_Socket::read() (reads a response from a DNS server)

Parameters:

integer   &$size   —  the size of the DNS packet read is passed back
   $max_size   — 

[ Top ]

write   [line 202]

boolean write( string $data)

writes the given string to the DNS server socket
  • Access: public

Overrides Net_DNS2_Socket::write() (writes the given string to the DNS server socket)

Parameters:

string   $data   —  a binary packed DNS packet

[ Top ]


Documentation generated on Mon, 11 Mar 2019 16:01:46 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.