Commit Graph

70 Commits

Author SHA1 Message Date
Chris Vandomelen
0646a49386 Corrected some bugs dealing with compile failures (should now compile
on most varieties of Linux, and should hopefully fix at least 3 of the
compile errors that were discovered). Also modified read() slightly
to take an optional parameter as to whether the data was binary or
text so it wouldn't stop reading on a newline or null byte received.
@- Made read() binary-safe in sockets.c (Chris Vandomelen)
@- Attempted fixing some compile failures (Chris Vandomelen)
# Hopefully someone will attempt to compile this on other systems, I
# have no access to other platforms to compile it on ....
2000-10-22 06:45:03 +00:00
Andrei Zmievski
7b4983c8f8 Mega-patch to get better resource information for modules.
* Fixed a bug in zend_rsrc_list_get_rsrc_type()
  * Switched register_list_destructors() to use
    zend_register_list_destructors_ex() instead
  * Updated all relevant modules to provide the resource type name
    to register_list_destructors() call
  * Updated var_dump() to output resource type name instead of number

@- Made resource type names visible, e.g. var_dump() and
@  get_resource_type() display "file" for file resources. (Andrei)
2000-10-20 18:25:16 +00:00
Rasmus Lerdorf
b189759bcd Clean up the alignment of configure --help output 2000-10-02 17:36:01 +00:00
Chris Vandomelen
322891a2dd Changed assignment in read() to be more sane. 2000-09-15 23:44:30 +00:00
Chris Vandomelen
d3ca6394eb Corrected memory leak in read(). 2000-09-14 21:48:15 +00:00
Chris Vandomelen
ce46ccd32b Added prototypes for socketpair() and shutdown(), and corrected an obvious
bug in socketpair (causing it to not return the created sockets to the PHP
script.)
2000-09-13 23:33:39 +00:00
Sascha Schumann
95d2ca8a46 Add proper struct sockaddr * casts and make use of memcpy/memset ('coz we
don't provide any fallbacks for bcopy/bzero).
2000-09-11 16:19:53 +00:00
Sterling Hughes
e9dd13754b Fix compile warning.
Fix proto.
Change PHP_MINFO output to be consistent.
2000-09-10 23:18:11 +00:00
Thies C. Arntzen
e5d8f20f17 make ZTS mode compile 2000-09-07 12:32:47 +00:00
Egon Schmid
0508a61421 Changed long to int. 2000-08-23 13:47:00 +00:00
Sterling Hughes
2604cb987a A little condensing,
Add an additional check to make sure port is specified with
  AF_INET in connect().
2000-08-23 08:29:16 +00:00
Chris Vandomelen
91944be3f7 Corrected bugs in php_if_connect() to make it work properly -- needed to
run htons() on the port number provided, and needed to perform DNS lookups
properly and store the results as expected.
2000-08-23 06:41:51 +00:00
Chris Vandomelen
8ef1279f2b Added another bug fix to detect for negative values being passed into the
fd_*() functions, as passing negative values would cause PHP to segfault.
2000-08-20 19:48:42 +00:00
Sterling Hughes
f75db1e3cb A Whole buncha stuff, mostly bug fixing...
- Make constants case-sensitive, conforming with the rest of PHP &
	the C API.
	- Make module compatible with thread safety features.
	- open_listen_sok() -> open_listen_sock()
	- Remove ext_skel comments
	- Get rid of the ZVAL macro and replace with the correct Z_*_*
	macros
	- declare all functions local to the file as static.
	- Remove empty PHP_MSHUTDOWN() function.
	- Removed confirm_sockets_compiled()
	- Changed RETVAL_* macro's to RETURN_* macro's eliminating errors
	with incorrect return values and a potential leak/crash or two.
	- functions that return void, actually return void
	- Replaced 'long' in the prototypes with 'int'
	- Fixed fd_zero() function, it gave a WRONG_PARAM_COUNT when you
	gave it the proper parameter count.
	- Changed the way an arbitrary number of parameters were accessed
	from build_iovec() to use the Zend API.
	- Added socketpair() and shutdown() functions.
2000-08-20 10:31:27 +00:00
Egon Schmid
81f59f0949 Aren't there some function names conflicts? 2000-07-08 15:13:31 +00:00
Chris Vandomelen
fd3d84ee52 * php4/ext/sockets.c, php4/ext/php_sockets.h:
Numerous changes. Many prototypes changed to be more like the
	appropriate *NIX counterparts. Many new prototypes defining many
	more advanced socket routines. Better AF_UNIX socket support.
	bind() now recognizes the socket type and acts appropriately,
	instead of needing the AF_* for the socket passed in.
# Something I'd like to write yet is proper signal() support. Unfortunately,
# the last time I tried, doing anything with the signal except ignoring it
# caused PHP to segfault. And to have decent socket support.. at least, from
# my experience, having signals is a good thing. Only problem.. to implement
# it, some changes would have to be made to the parser - since that is where
# the problems lie on handling asynchronous signals.
2000-07-08 01:50:34 +00:00
Egon Schmid
80f13900f7 Fixed some protos. 2000-07-05 18:33:32 +00:00
Sascha Schumann
e24f505bf9 Identifiers which begin with an underscore are reserved. Changed
_PHP_SOCKETS_H to PHP_SOCKETS_H.
2000-07-03 06:45:07 +00:00
Rasmus Lerdorf
78ec5a54a0 Use AC_CHECK_HEADERS(unistd.h) instead 2000-07-03 05:25:00 +00:00
Chris Vandomelen
21abde5ca1 * Makefile.in
config.m4
  php_sockets.h
  sockets.c
  sockets.php:
  - Added files needed for Unix-style sockets support in PHP.
2000-07-03 04:35:57 +00:00