<HTML ><HEAD ><TITLE >php_stream_sock_open_unix</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="PHP Manual" HREF="index.html"><LINK REL="UP" TITLE="Streams Socket API Reference" HREF="streams.socket-api.html"><LINK REL="PREVIOUS" TITLE="php_stream_sock_open_host" HREF="streams.php-stream-sock-open-host.html"><LINK REL="NEXT" TITLE="Streams Structures" HREF="streams.structs.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="streams.php-stream-sock-open-host.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="streams.structs.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="streams.php-stream-sock-open-unix" ></A >php_stream_sock_open_unix</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN102806" ></A ><P > (no version information, might be only in CVS)</P >php_stream_sock_open_unix -- Open a UNIX domain socket and convert into a stream</DIV ><DIV CLASS="refsect1" ><A NAME="AEN102809" ></A ><H2 >Description</H2 >php_stream * <B CLASS="methodname" >php_stream_sock_open_unix</B > ( const char * path, int pathlen, int persistent, struct timeval * timeout)<BR ></BR ><P > <B CLASS="function" >php_stream_sock_open_unix()</B > attempts to open the UNIX domain socket specified by <TT CLASS="parameter" ><I >path</I ></TT >. <TT CLASS="parameter" ><I >pathlen</I ></TT > specifies the length of <TT CLASS="parameter" ><I >path</I ></TT >. If <TT CLASS="parameter" ><I >timeout</I ></TT > is not NULL, it specifies a timeout period for the connection attempt. <TT CLASS="parameter" ><I >persistent</I ></TT > indicates if the stream should be opened as a persistent stream. Generally speaking, this parameter will usually be 0. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B > This function will not work under Windows, which does not implement unix domain sockets. A possible exception to this rule is if your PHP binary was built using cygwin. You are encouraged to consider this aspect of the portability of your extension before it's release. </P ></BLOCKQUOTE ></DIV ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B > This function treats <TT CLASS="parameter" ><I >path</I ></TT > in a binary safe manner, suitable for use on systems with an abstract namespace (such as Linux), where the first character of path is a NUL character. </P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="streams.php-stream-sock-open-host.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="streams.structs.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >php_stream_sock_open_host</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="streams.socket-api.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Streams Structures</TD ></TR ></TABLE ></DIV ></BODY ></HTML >