Class: SMTP_Server_Socket

Source Location: /SMTP_Server_Socket.php

Class Overview [line 12]


SMTP_Server_Socket

Author(s):

Version:

  • 1.0

Copyright:

  • Copyright (c) 2008, Jason Johnson

Variables

Constants

Methods


Inherited Variables

Inherited Constants

Inherited Methods



Class Details

SMTP_Server_Socket

Tags:

[ Top ]


Class Variables

$log

[line 13]

Type: mixed

Overrides:

[ Top ]

$remote_address

[line 15]

Type: mixed

Overrides:

[ Top ]

$socket

[line 14]

Type: mixed

Overrides:

[ Top ]


Class Methods

SMTP_Server_Socket

SMTP_Server_Socket SMTP_Server_Socket( [resource $socket = null])

[line 22]

Constructor with an optional argument of a socket resource

Parameters:

  • resource $socket - A socket resource as returned by socket_create() or socket_accept()

[ Top ]

accept

SMTP_Server_Socket accept( )

[line 74]

Block and accept an incoming connection

Parameters:

[ Top ]

bind

void bind( string $host, int $port)

[line 50]

Binds the socket to a host and port

Parameters:

  • string $host - The host to bind the socket to
  • int $port - The port on the host to use

[ Top ]

close

void close( )

[line 137]

Closes the socket

Parameters:

[ Top ]

connect

void connect( string $host, [int $port = 25])

[line 38]

Connects to the the specified $host on $port

Parameters:

  • string $host - The host to connect to
  • int $port - The port on the host to use, defaults to 25

[ Top ]

listen

void listen( )

[line 63]

Cause the socket to listen for incoming connections

Parameters:

[ Top ]

read

string read( )

[line 126]

Reads and returns a default length of bytes from the socket

Parameters:

[ Top ]

remote_address

string remote_address( )

[line 91]

Returns the address of the remote client or server

Parameters:

[ Top ]

write

void write( string $buffer, [ $raw = false])

[line 100]

Writes the supplied buffer to the socket

Parameters:

  • string $buffer - The buffer to be written to the socket
  • $raw -

[ Top ]

write_file

void write_file( string $path)

[line 111]

Writes an entire file to the socket

Parameters:

  • string $path - The absolute or relative path of the file

[ Top ]


Class Constants


Documentation generated on Thu, 10 Apr 2008 02:41:55 -0500 by phpDocumentor 1.4.2