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

Class: Net_DNS2_Socket_Sockets

Source Location: /Net_DNS2-1.3.2/Net/DNS2/Socket/Sockets.php

Class Overview

Net_DNS2_Socket
   |
   --Net_DNS2_Socket_Sockets

Socket handling class using the PHP sockets extension


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 sockets extension

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



[ Top ]


Method Detail

close   [line 169]

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 76]

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 252]

mixed read( integer &$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

[ Top ]

write   [line 187]

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 Sun, 01 Dec 2013 01:30:23 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.