Commit Graph

39 Commits

Author SHA1 Message Date
Wez Furlong
47e7fef08e Allow win32 stuff to build non-zts.
Fix stream crypto func (again? didn't I already commit that?)
2004-07-31 17:28:27 +00:00
Ilia Alshanetsky
45ddc6a5cd Better address availability check. 2004-07-28 23:34:27 +00:00
Ilia Alshanetsky
445daac3ab Fixed possible crash in stream_socket_recvfrom() when length parameter has
a negative value.
2004-07-28 23:21:54 +00:00
Wez Furlong
17adf438a2 Added stream_context_get_default() which returns the default context option.
You may then set options that affect streams operations for the whole script.

Added stream_socket_enable_crypto() which allows you to turn on or off a crypto
layer (eg: SSL/TLS) on stream, if supported by the underlying transport.

Registered a bunch of constants for that.
2004-07-22 12:12:28 +00:00
Ard Biesheuvel
5232a5afea 64-bit bugsquash party 2004-06-16 23:57:25 +00:00
Ard Biesheuvel
81f05c18f5 Wordsize fixes 2004-02-25 20:16:27 +00:00
Ard Biesheuvel
b2bc520067 64-bit fixes 2004-02-23 16:26:34 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
Wez Furlong
7a9cf22ed1 Probable fix for #26534 2003-12-05 20:25:14 +00:00
Wez Furlong
37f135ceef Add stream_socket_sendto and stream_socket_recvfrom which work very much
like sendto() and recvfrom() syscalls.
2003-11-29 21:46:50 +00:00
Ilia Alshanetsky
e1bdc33d18 More memory leak fixes for stream contexts. 2003-11-28 18:33:14 +00:00
Wez Furlong
43698d6dbb initialize this one to be safe 2003-11-27 17:37:35 +00:00
Derick Rethans
3ab8d263b8 - Always store the URI path in the streams structure, and expose it with
stream_get_meta_data().
2003-11-03 14:12:46 +00:00
Wez Furlong
628afb40b6 Implement stream_get_contents, which is somewhat akin to file_get_contents,
except that it works on an already opened stream.
2003-10-08 10:07:25 +00:00
Jason Greene
7eea6525a7 Fix EINVAL errors for OS's (Solaris + BSD) that do not appreciate microseconds >= 1 second
Patch submitted from meebery@php.net
2003-07-22 07:20:55 +00:00
Wez Furlong
5ecc91c27d Merge selectable descriptor casting from PHP_4_3 branch. 2003-06-28 11:24:47 +00:00
Sara Golemon
2e4ef86e10 MFB
Plug leak in context notifiers, implement notifier->dtor
2003-06-27 16:23:58 +00:00
Sara Golemon
496d17b98d Quiet down decode_context_param when stream (not context) is passed.
Switch stream_socket_*() to use macro for retrieving context from zval.
2003-06-19 22:30:54 +00:00
Ilia Alshanetsky
7ef01f01b9 Reverting previous patch (not necessary, thanks Pollita ;) ) 2003-06-19 21:04:43 +00:00
Ilia Alshanetsky
a370ceb742 Fixed memory leak, when invalid context is specified. 2003-06-19 16:35:17 +00:00
Ilia Alshanetsky
cbfb63c1c4 Fixed possible crashes in streams code 2003-06-19 16:10:54 +00:00
Sara Golemon
897e6a4069 No need to allocate a hashtable when return_value is just going to be overwriten 2003-06-17 18:38:56 +00:00
Sara Golemon
2f4e91bf8a optionvalue is being copied via zval_copy_ctor, there's no need to addref the original 2003-06-16 18:19:14 +00:00
Sara Golemon
99db19661a Plug leak (context options not freed)
Make contexts auto-registered, ensures userland contexts
and C API contexts are both dealt with on request shutdown.
Also brings contexts in keeping with streams which are already
auto-registered.
2003-06-13 21:33:59 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Wez Furlong
1011d196b1 Add "seekable" flag to stream_get_meta_data()
# Caveat Emptor: some streams don't know if they are seekable until
# sometime tries to seek first (user streams).
2003-06-02 16:36:10 +00:00
Wez Furlong
2d1a6e5dc2 MFB context refcounting and text-mode fopen fixes 2003-05-21 13:33:55 +00:00
Sara Golemon
7c8c09b3cf Revert change to stream_copy_to_stream() 2003-04-20 01:18:58 +00:00
Sara Golemon
6dde464ce7 Let stream_copy_to_stream() accept either stream resource or filename/url string. If filename, open the file, do the copy, then close it. 2003-04-19 02:47:16 +00:00
Moriyoshi Koizumi
49b43ad115 Changed stream filter factory to be capable of accepting a zval as a parameter
instead of a string
2003-04-16 14:30:25 +00:00
Wez Furlong
c64256e671 Warning fix 2003-04-04 21:09:25 +00:00
Sara Golemon
a65564f0fa User shouldn't have to initialize this pass-by-ref parameter 2003-04-04 20:43:36 +00:00
Wez Furlong
0148c0cb02 Simplify and enhance readability. 2003-04-04 08:57:40 +00:00
Sara Golemon
b2d4514580 Added stream_get_transports() 2003-04-04 05:21:03 +00:00
Wez Furlong
0fd995f9fc Add the mode string that was used to open the stream to the meta data,
as requested by Philip Olson.
2003-03-18 23:45:27 +00:00
Wez Furlong
558db0d87a Expose php_stream_copy_to_stream as stream_copy_to_stream(); a high
performance alternative to looping reads and writes.
2003-03-01 01:27:50 +00:00
Wez Furlong
349ce76f96 Tidy up stupid signed/unsigned issues with win32 by introducing a php_socket_t typedef. 2003-02-28 21:03:36 +00:00
Wez Furlong
1b53a2d12e New user-space functions:
. stream_socket_client() - similar to fsockopen(), but more powerful.
  . stream_socket_server() - Creates a server socket.
  . stream_socket_accept() - Accept a client connection.
  . stream_socket_get_name() - Get local or remote name of socket.

Tidy up some leaks and debug printfs.
Move more streams functions into streamsfuncs.c and streamsfuncs.h.
2003-02-28 19:53:21 +00:00
Wez Furlong
493ef36299 Update win32 build.
Since msvc sucks, I had to rename ext/standard/streams.c to ext/standed/streamsfuncs.c
2003-02-27 22:43:51 +00:00