com.caucho.quercus.lib.file
Class SocketModule

java.lang.Object
  extended by com.caucho.quercus.module.AbstractQuercusModule
      extended by com.caucho.quercus.lib.file.SocketModule
All Implemented Interfaces:
QuercusModule

public class SocketModule
extends AbstractQuercusModule

Information and actions for about sockets


Field Summary
 
Fields inherited from class com.caucho.quercus.module.AbstractQuercusModule
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
 
Constructor Summary
SocketModule()
           
 
Method Summary
 java.util.Map<StringValue,Value> getConstMap()
          Returns the constants defined by this module.
static boolean socket_bind(Env env, SocketInputOutput socket, StringValue address, int port)
           
static void socket_close(Env env, SocketInputOutput socket)
           
static boolean socket_connect(Env env, SocketInputOutput socket, StringValue address, int port)
           
static SocketInputOutput socket_create(Env env, int domain, int type, int protocol)
           
static Value socket_get_status(Env env, BinaryStream stream)
           
static Value socket_read(Env env, SocketInputOutput socket, int length, int type)
           
static boolean socket_set_timeout(Env env, Value stream, int seconds, int milliseconds)
           
 boolean socket_shutdown(Env env, SocketInputOutput file, int how)
          Closes a socket.
static Value socket_write(Env env, SocketInputOutput socket, java.io.InputStream is, int length)
           
 
Methods inherited from class com.caucho.quercus.module.AbstractQuercusModule
addConstant, addConstant, addConstant, getIniDefinitions, getLoadedExtensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketModule

public SocketModule()
Method Detail

getConstMap

public java.util.Map<StringValue,Value> getConstMap()
Returns the constants defined by this module.

Specified by:
getConstMap in interface QuercusModule
Overrides:
getConstMap in class AbstractQuercusModule

socket_create

public static SocketInputOutput socket_create(Env env,
                                              int domain,
                                              int type,
                                              int protocol)

socket_bind

public static boolean socket_bind(Env env,
                                  SocketInputOutput socket,
                                  StringValue address,
                                  int port)

socket_close

public static void socket_close(Env env,
                                SocketInputOutput socket)

socket_connect

public static boolean socket_connect(Env env,
                                     SocketInputOutput socket,
                                     StringValue address,
                                     int port)

socket_get_status

public static Value socket_get_status(Env env,
                                      BinaryStream stream)

socket_read

public static Value socket_read(Env env,
                                SocketInputOutput socket,
                                int length,
                                int type)

socket_set_timeout

public static boolean socket_set_timeout(Env env,
                                         Value stream,
                                         int seconds,
                                         int milliseconds)

socket_write

public static Value socket_write(Env env,
                                 SocketInputOutput socket,
                                 java.io.InputStream is,
                                 int length)

socket_shutdown

public boolean socket_shutdown(Env env,
                               SocketInputOutput file,
                               int how)
Closes a socket.

Parameters:
how - 0 = read, 1 = write, 2 = both